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 all!
I'm running into an issue that really stumps me. I want to differentiate the top 5 bars in a bar chart by giving them a different color and I keep running into a wall. It has to be done using a measure as the top 5's need to change when filtering.
I've been trying to write a measure with the TOPN dax function that can either be inserted as a legend or as a field value in conditional formatting, but I can't get the syntax right.
Not omitting an example due to laziness - I just had nothing worth posting 😅
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @SleveMcDichael
You can try the following methods.
Measure:
Rank = RANKX(ALL('Table'),CALCULATE(SUM('Table'[Value])),,DESC)
Color = IF([Rank]<=5,"Green")
Result:
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @SleveMcDichael
You can try the following methods.
Measure:
Rank = RANKX(ALL('Table'),CALCULATE(SUM('Table'[Value])),,DESC)
Color = IF([Rank]<=5,"Green")
Result:
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
46 | |
39 | |
19 | |
19 |