Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
I'm having trouble displaying a ranking and incorporating a legend that doesn't do a seperate ranking for each item in the legend.
I have successfully ranked individuals (Appointment_Key) based on an income value (Apportioned award amount) using the DAX:
Solved! Go to Solution.
Colleagues and I have just cracked it. In the RANX ALLSELECTED statement I was referencing a single column (person ID), but needed to just reference the whole table. Simple oversight on my part (although not immediately obvious!)
Thank you for your help. Reviewing your suggestions helped us get to the answer!
Hi,
According to your description, i create two simple tables to test:
Then create a rank measure:
Rank = RANKX(ALLSELECTED(Scores),CALCULATE(SUM(Scores[Scores])),,ASC,Skip)
Choose a table visual and it works well:
Then choose Scatter Chart visual, use [Gender] from another table, and it shows the total rank:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto Zhi
Hi Giotto,
Your logic makes sense, and I expected that behaviour when I created the charts, but nonetheless I still can't get my report to do what I need, even following the steps exactly. It is still seemingly doing the calculation for each gender and ranking them seperately. When I tabulate the results you can see this. I don't know if it's my model, or the DAX?
A difference I've just realised though is that unlike your scoring table, my 'Score' is a measure using a column from another dimension, rather than a column native to the table the person IDs are coming from. Is this possibly part of the issue?
Hi,
I create two tables to test:
Then create a total score measure for each person:
Scores = SUM(Scores[ItemScores])
Create a rank measure:
rank = RANKX(ALLSELECTED(Person),[Scores],,DESC,Skip)
The result shows:
The rank still work well.
So could you tell me details about what the relationship among your tables?
Best Regards,
Giotto Zhi
Here is a diagram of the model:
I've used your term score, which in my original post is 'Apportioned award value', and is a measure calculated using the 'Score' * an individuals % from the table I've labelled 'Intermediate table'.
Thank you for your continued help 🙂
Hi,
Could you please tell me more details about your tables' relationship such as one-to-one or one-to-many?
And please show the linked column between each two tables.
These info will help me solve your issue as fast as possible.
Best Regards,
Giotto Zhi
I've included connecting fields in the above. Join types are illustrated in the connections - forks are many.
Thanks.
Colleagues and I have just cracked it. In the RANX ALLSELECTED statement I was referencing a single column (person ID), but needed to just reference the whole table. Simple oversight on my part (although not immediately obvious!)
Thank you for your help. Reviewing your suggestions helped us get to the answer!
Hi,
If my answer help solve your problem, please mark it as a solution.
Thanks.
Best Regards,
Giotto Zhi
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |