Challenge - 5 Problems
RANKX Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ dax_lod_result
intermediate2:00remaining
Calculate rank of sales by product
Given a Sales table with columns Product and SalesAmount, what is the rank of Product 'B' using this measure?
Sales data:
Product A: 100
Product B: 200
Product C: 150
Rank Sales = RANKX(ALL(Sales[Product]), SUM(Sales[SalesAmount]), , DESC, Dense)Sales data:
Product A: 100
Product B: 200
Product C: 150
Power BI
Rank Sales = RANKX(ALL(Sales[Product]), SUM(Sales[SalesAmount]), , DESC, DENSE)
Attempts:
2 left
💡 Hint
Remember that DESC means highest value gets rank 1.
✗ Incorrect
Product B has the highest sales (200), so it gets rank 1 with DESC order and Dense ranking.
❓ visualization
intermediate1:30remaining
Best visualization for showing product ranks
You want to show product sales ranks on a dashboard. Which visualization best shows the rank order clearly?
Attempts:
2 left
💡 Hint
Think about which chart shows order clearly.
✗ Incorrect
A bar chart sorted by rank ascending shows products from best to worst rank clearly and is easy to read.
❓ data_modeling
advanced2:30remaining
Ranking with filters and context
You have a Sales table with Product, Region, and SalesAmount. You want to rank products by sales within each Region. Which DAX measure correctly calculates this?
Attempts:
2 left
💡 Hint
You want to keep Region filter but remove Product filter inside RANKX.
✗ Incorrect
Option A removes Product filter but keeps Region filter using ALLEXCEPT, so ranking is within each Region.
🔧 Formula Fix
advanced2:00remaining
Identify error in RANKX measure
This DAX measure is intended to rank products by sales but returns an error:
What is the cause of the error?
Rank Sales = RANKX(Sales[Product], SUM(Sales[SalesAmount]))What is the cause of the error?
Power BI
Rank Sales = RANKX(Sales[Product], SUM(Sales[SalesAmount]))
Attempts:
2 left
💡 Hint
Check the first argument type for RANKX.
✗ Incorrect
RANKX requires a table as first argument, but Sales[Product] is a column reference, causing error.
🧠 Conceptual
expert2:30remaining
Effect of ranking method on ties
You use RANKX with the Dense ranking method on sales data with ties. How does Dense ranking handle ties compared to Skip ranking?
Attempts:
2 left
💡 Hint
Think about how ranks progress after ties in Dense vs Skip.
✗ Incorrect
Dense ranking assigns the same rank to tied values and the next rank increments by 1, unlike Skip which skips ranks.