Recall & Review
beginner
What does the TOPN function do in Power BI?
The TOPN function returns the top N rows of a table based on a specified expression or column, sorted in descending order by default.
Click to reveal answer
beginner
Write the basic syntax of the TOPN function.
TOPN(<N_value>, <table>, <orderBy_expression>[, <order>[, <orderBy_expression>[, <order>]...]]), where N_value is how many rows to return.
Click to reveal answer
intermediate
How can you change the sorting order in TOPN from descending to ascending?
Add the optional <order> argument with the value ASC after the <orderBy_expression> to sort ascending instead of the default DESC.
Click to reveal answer
beginner
What type of value does the TOPN function return?
TOPN returns a table containing the top N rows based on the sorting criteria, not a single value.
Click to reveal answer
intermediate
Can TOPN be used inside other DAX functions? Give an example.
Yes, for example, you can use TOPN inside CALCULATE to filter a table to the top N rows before aggregation.
Click to reveal answer
What does the TOPN function return in Power BI?
✗ Incorrect
TOPN returns a table containing the top N rows based on the sorting criteria.
Which argument in TOPN specifies how many rows to return?
✗ Incorrect
How do you sort the TOPN results in ascending order?
✗ Incorrect
Adding ASC after the orderBy_expression changes the sort order to ascending.
Can TOPN be used inside CALCULATE to filter data?
✗ Incorrect
TOPN can be nested inside CALCULATE to filter data to top N rows.
What is the default sort order of TOPN if not specified?
✗ Incorrect
TOPN sorts in descending order by default.
Explain how the TOPN function works and when you might use it in a Power BI report.
Think about showing best-selling products or top customers.
You got /4 concepts.
Describe how to change the sorting order in TOPN and why that might be useful.
Consider when you want to see smallest sales instead of largest.
You got /3 concepts.