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.
I have a situation in which I am ranking various metrics for 15 different stores. In addtion I also have three different reporting dates (the last day of each quarter), that are being chosen via a slicer.
I have created a calculated ranking for all stores for each metric.
The formula I am using is: RANKX(ALLEXCEPT(TABLE, REPORTING PERIOD), CALCULATE(SUM(METRIC)))
This formula is working great and is correct. However, there are several metrics that need to be ascending instead descending because a smaller value is actually better (If that particular store has the smallest value, then it would rank 1). When I change the formula to asc at the end, it then proceeds to rank from 31 -45 instead of 1-15, regardless of whichever time period I choose in the slicer.
Does anybody know how to correct this formula so that ascending will work? Thanks in Advance.
Solved! Go to Solution.
@Anonymous
Can you try the following pattern?
RANKX (
CALCULATETABLE ( ALLSELECTED ( table ), VALUES ( table[REPORTING PERIOD] ) ),
CALCULATE ( SUM ( Table[METRIC] ) )
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
This worked. Thank You, Kindly.
@Anonymous
Can you try the following pattern?
RANKX (
CALCULATETABLE ( ALLSELECTED ( table ), VALUES ( table[REPORTING PERIOD] ) ),
CALCULATE ( SUM ( Table[METRIC] ) )
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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 |
---|---|
114 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |