Forum Discussion
HarishMJ
1 year agoRegular Visitor
Ranking not working as expected
Hi everyone, I’m facing an issue with the RANKX DAX formula and would greatly appreciate your help! Here’s the scenario: I have created the following RANKX measure, which works perfectly in a t...
- 1 year ago
measure:
RankX =
IF (
ISFILTERED ( Sheet1[CIF] ) || ISFILTERED ( Sheet1 ),
RANKX (
ALLSELECTED ( Sheet1[CIF] ),
CALCULATE ( SUM ( Sheet1[Amount] ) ),
,
DESC,
DENSE
),
RANKX (
ALL ( Sheet1[CIF] ),
CALCULATE ( SUM ( Sheet1[Amount] ) ),
,
DESC,
DENSE
)
)💌 If this helped, a Kudos 👍 or Solution mark ✅ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Bibiano_Geraldo
Super User
1 year agoHi HarishMJ ,
Please update your DAX to something like this:
RankX =
IF (
ISFILTERED(Sheet1[CIF]),
RANKX(
ALL(Sheet1[CIF]),
CALCULATE(SUM(Sheet1[Amount])),
,
DESC
),
RANKX(
ALLSELECTED(Sheet1),
CALCULATE(SUM(Sheet1[Amount])),
,
DESC
)
)
your final output will look like this: