The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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