Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 a descending order, but Others is presented as last. For example, if i rank the above alphabetically or by value, "Others" would be presented in the middle. This is wrong, it needs to be last. How do i rank everything except "Others"?
Thank you!
Solved! Go to Solution.
Please confirm that you created measures, not calculated columns.
Proud to be a Super 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 )
Proud to be a Super User!
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.
Please confirm that you created measures, not calculated columns.
Proud to be a Super User!
User | Count |
---|---|
80 | |
77 | |
63 | |
48 | |
44 |
User | Count |
---|---|
102 | |
44 | |
39 | |
39 | |
36 |