Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello good afternoon everyone,
I have a graph in power bi that shows a calculation that is basically a division, and I need to show the top 10 of the highest values and at the same time the lowest ones that in my case are going to be negative values, I have to show this in a bar graph but I can't find a way to do it.
I hope you can help me.
Hi @Syndicate_Admin
To achieve a goal you can create these 3 measures.
I use my example, you can modify it for your parameters.
I have a table with profits and let's try to show the top 10 and bottom 10 countries by profits.
1. Ranking descending ( to get top 10).
for colors, we can use conditional formatting based on the measure :
Result :
Pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hello thank you very much for your answer, the situation I have is that the measurement I want the top 10 of seniors and minors in turn uses other measurements that in total use 3 different tables, I have not found how to adapt the measurement to that scenario.
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Try this measure. Change [YourValue] out for the measure that is doing your division.
TopAndBottom10Combined =
VAR HighestRanked =
RANKX(ALL('YourTable'), [YourValue], , DESC, DENSE)
VAR LowestRanked =
RANKX(ALL('YourTable'), [YourValue], , ASC, DENSE)
RETURN
IF(
(HighestRanked <= 10) || (LowestRanked <= 10 && [YourValue] < 0),
[YourValue],
BLANK()
)
I did not find a way to apply it because the measure I used in turn uses other measures that in total use data from three different tables, I do not know how it would be applied.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
81 | |
53 | |
37 | |
35 |