Module 4 ยท DAX for harder questions Lesson 10 of 15
Ranking and TOPN
Ranking answers "which products are in the top ten" without sorting a table by hand. RANKX does it as a measure, and TOPN returns just the rows that matter.
Worked example
RANKX(ALL(dim_product[product]), [Total Sales]) numbers every product by sales, so a table filtered to rank <= 10 shows the top ten.
Your practice task
Build a measure that ranks products by sales and show only the top five on a visual.
Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.
Key takeaway
Ranking answers "which products are in the top ten" without sorting a table by hand. RANKX does it as a measure, and TOPN returns just the rows that matter.
Keep your place in this course
A free account saves which lessons you have finished and unlocks the certificate. The lesson itself stays free to read.
Create free account or sign inCourse complete
You finished every lesson.
Your certificate is ready, and the projects you built are the proof to attach to an application.
Almost there
15 lessons left of 15
Finish every lesson to unlock the certificate. Each one ends in a practice task โ do them and the final project brief writes itself.
