Forum Discussion
CarlsBerg999
5 years agoHelper V
Silly ranking question
Hi, I basically i have two columns: Linkedin 500 Facebook 400 Twitter 350 Others 370 I want these values to be ranked so that anything that is not "Others" is ranked and presented in ...
- 5 years ago
DataInsights
5 years agoSuper User
Try the following measures:
Total Amount = SUM ( RankTest[Amount] )
Company Rank =
VAR vAllValues =
ALL ( RankTest[Company] )
VAR vValuesToRank =
FILTER ( vAllValues, RankTest[Company] <> "Others" )
VAR vRowCount =
COUNTROWS ( vValuesToRank )
VAR vResult =
RANKX ( vValuesToRank, [Total Amount],, DESC, DENSE )
RETURN
IF ( MAX ( RankTest[Company] ) = "Others", vRowCount + 1, vResult )
- CarlsBerg9995 years agoHelper V
I'm getting the same Rank (1) for all of these. I think the formula is making SUM for entire "Amount" column which is the same for all values. Am i doing something wrong? In the example, the Total Amount = SUM(RankTest[Amount])=1620 for all values. Therefore the rank is the same for all.
- DataInsights5 years agoSuper User