Forum Discussion
Georgia_H
4 years agoHelper I
How to do RankX on multiple columns ?
Hi all, i am struggling with RANKX funtion on multiple columns. All the columns are from the same table. I want to rank across different reporting Period, Region, BU, Metric_ID, Domain based on Valu...
- 4 years ago
Georgia_H this is for a measure:
Rank Measure = VAR _value_test = NOT ISBLANK (CALCULATE(SUM('rep F_ITS_MetricsLanding'[Compliance_Num]))) VAR _result = RANKX( ALLSELECTED('rep F_ITS_MetricsLanding'[LBU]), CALCULATE(SUM('rep F_ITS_MetricsLanding'[Compliance_Num])) ) RETURN IF( _value_test, _result )
SpartaBI
4 years agoCommunity Champion
Georgia_H I took your new sample data and added it to the file.
I'm getting different result. Please check and let me know:
How to do RankX on multiple columns 2022-07-23.pbix
If you don't succeed you can PM me and we could do a quick zoom call and look together if you want.
P.S. Check out my showcase report - got some high level stuff there. Sure you will find there a lot of cool ideas. Please give it a thumbs up over there if you liked it 🙂
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
SpartaBI
4 years agoCommunity Champion
Georgia_H this is for a measure:
Rank Measure =
VAR _value_test = NOT ISBLANK (CALCULATE(SUM('rep F_ITS_MetricsLanding'[Compliance_Num])))
VAR _result =
RANKX(
ALLSELECTED('rep F_ITS_MetricsLanding'[LBU]),
CALCULATE(SUM('rep F_ITS_MetricsLanding'[Compliance_Num]))
)
RETURN
IF(
_value_test,
_result
)