Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I wanted to rank only for category which have names not for all.
Data:
Category | Sales |
Electronics | 556 |
Pharmacy | 88 |
Bakery | 999 |
800 |
Expected Output:
Category | Sales | Rank |
Electronics | 556 | 2 |
Pharmacy | 88 | 3 |
Bakery | 999 | 1 |
800 |
DAX Measure Used (Rank) =
I am having the same problem - did anyone find a solution to this ? 🙂
Hi @chotu27 ,
You can add another argument in your CALCULATE to exclude category items that are blank (assuming they're indeed blank/null). Try this:
DAX Measure Used (Rank) =
RANKX (
ALL ( 'Table'[Category] ),
CALCULATE (
SUM ( 'Table'[Sales] ),
ALLEXCEPT ( 'Table', 'Table'[Category] ),
FILTER ( 'Table', 'Table'[Category] <> BLANK () )
)
)
Alternatively, you can open go to: filter pane > visual filter tile > category > advanced filter > is not blank.
Proud to be a Super User!
I'm getting all 1's when i use your measure for ranking,
and visual level filter will remove blank fields but it will rank blank field also i wanted exclude blanks while ranking
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
95 | |
82 | |
71 | |
64 |
User | Count |
---|---|
116 | |
106 | |
94 | |
79 | |
72 |