Forum Discussion
epmck11
8 years agoFrequent Visitor
Ranking sums based on condition
Hi all, I'm still learning DAX, and it's a bit of an adjustment for me, so any help would be appreciated. I'm trying to rank the sums of values based on criteria. Imagine I have a table like this...
Vvelarde
Community Champion
8 years ago
Hi, try with this measure
RankbyBranch-Customer =
IF (
HASONEVALUE ( Table1[Customer] );
RANKX (
ALLSELECTED ( Table1[Customer] );
CALCULATE ( SUM ( Table1[Revenue] ) )
)
)
Regards
Victor
epmck11
8 years agoFrequent Visitor
You guys are so smart! Thanks for your help, it worked.
Question though: for my Power BI, I need to use a comma instead of a semi-colon or it gives me an improper syntax error. What is the reason for this?