Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
yoyfreddy
Frequent Visitor

Visual with multiple filter not working

Hello experts!

 

I have a table containing the Unit Cost of different Cost Category of different Airlines; and another table with the Cost Driver of different Cost Category of different Airlines. I wish to show Total Cost by airline and by cost category in a single visual.

yoyfreddy_0-1646909522106.png

But, I cannot create two active relationships across two tables, so the visual cannot distinguish each Airline's Cost Driver.

   My expected result:

yoyfreddy_4-1646910123129.png

 

   The actaul result:

yoyfreddy_7-1646910778396.png

 

 

   Source data : Extract of Unit Cost Table:

yoyfreddy_3-1646909912676.png

 

  Source data :  Extract of OpStat (Cost Driver) Table
yoyfreddy_2-1646909895462.png

 

Relationship Table

yoyfreddy_5-1646910260951.png

 

Here is my measure:

Unit Cost in period = Cost[Unit Cost]CALCULATE(sum(OpStat[Value]),
DATESBETWEEN('Date'[Date].[Date],FIRSTDATE('Date'[Date]),LASTDATE('Date'[Date])))

 

(My measure have another bug related to the Date measure, please ignore it, that will be a seperate question.)

 

My BI Dashboard and Data File can be retrieved here :
test - Copy

 

Thanks a lot !

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @yoyfreddy ,

 

Create a new column in Cost table:

Driver = RELATED(Classification[Cost Driver])

Create a new measure like below:

Measure = 
var unit_cost = MAX(Cost[Unit Cost])
var airline_ = MAX(Cost[Airline])
var driver_ = MAX(Cost[Driver])
var sum_opstat = CALCULATE(SUM(OpStat[Value]),FILTER(OpStat,OpStat[Airline]=airline_&&OpStat[Cost Driver]=driver_))
return MAX(Cost[Unit Cost])*sum_opstat

Vlianlmsft_0-1647238678757.png

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @yoyfreddy ,

 

Create a new column in Cost table:

Driver = RELATED(Classification[Cost Driver])

Create a new measure like below:

Measure = 
var unit_cost = MAX(Cost[Unit Cost])
var airline_ = MAX(Cost[Airline])
var driver_ = MAX(Cost[Driver])
var sum_opstat = CALCULATE(SUM(OpStat[Value]),FILTER(OpStat,OpStat[Airline]=airline_&&OpStat[Cost Driver]=driver_))
return MAX(Cost[Unit Cost])*sum_opstat

Vlianlmsft_0-1647238678757.png

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you Liang for your help. Your file also solved my Date problem too!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.