Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!