Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all
I have a stacked bar chart and I have some visual level filters.
I'm getting top 3 customer by sum of value. After that i want to add legend by type, but some of my customers type is null. When i filter on visual level filters, top 3 calculation is changing and wrong customers are coming on my chart. Because the logic works as first filter the data and then select the Top 3 customer by value. I don't want this logic.
Here is my example dataset
Customer | Type | Value |
A | X | 2 |
B | Y | 3 |
E | 4 | |
C | X | 3 |
D | Y | 2 |
B | Y | 3 |
C | 5 | |
B | X | 1 |
D | 5 | |
A | X | 3 |
B | Y | 2 |
E | X | 1 |
C | 6 |
and example ss for this charts.
Solved! Go to Solution.
Create new measure as
new_mea = CALCULATE(sum(Table1[Value]);all(Table1[Type]))
use this measure in top 3 filter instead of sum of value
Create new measure as
new_mea = CALCULATE(sum(Table1[Value]);all(Table1[Type]))
use this measure in top 3 filter instead of sum of value
Hi @Anonymous,
By my tests, there is no better ways to change that logic.
Actually, the filters will be interact with each other.
For your scenario, we could see that Type category is bigger than customer category, so it seems that it filter type first then select the Top 3 customer by value.
Best Regards,
Cherry
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |