Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |