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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tkramer
Advocate I
Advocate I

Slicer not filtering measures correctly

Hey community!

I am working with some data where there are three types of costs (Labor, Parts, Other).  Each cost is on a column called "Item Price" and each type of cost is on a column called "Item Type".  I have 3 separate measures to calculate each.

Example 1:
Calculate( SUM( 'table'[Item Price] ), 
'table'[Item Type] = "Labor"

 

This measure is replicated for the other item types, but the filter is changed.  And then I have another measure called "Total Cost" where I have tried two different methods:

1. each of these 3 measures summed together
2. simply summing the "Item Price" with no filter

All 4 measures sum correctly in the report and filter correctly when I interact with the visuals.  

 

However, my problem is when I use the actual slicer/filter in the report to change the item type (Parts, Labor, Other), the 3 item type measures change, but the "Total Cost" measure does not, giving confusing results. 

 

Example 1: 

When I select the Model Number with a total of $8,529, I get the measures filtered correctly on the top right of the screen (all add up correctly).  

However, when I change the "Line Type" in the slicer to "Parts", the Total Costs measure changes, but the individual measures based off each type do not change.  This makes the "Line Type" slicer useless.  

 

Does anyone know what would be causing this issue? 

Help would be so greatly appreciated!!

2 REPLIES 2
lbendlin
Super User
Super User

Read about REMOVEFILTERS.

 

lbendlin_0-1681529536263.png

 

Line App Grand Total = max(0,CALCULATE(SUM( 'FACT-Dishwashers2022'[Item Approved Ext. Total] ),REMOVEFILTERS('FACT-Dishwashers2022'[Line Type])))

Line App Labor Total = var total = CALCULATE( SUM( 'FACT-Dishwashers2022'[Item Approved Ext. Total] ), 'FACT-Dishwashers2022'[Line Type] = "Labor" ) var filters = IF( OR( SELECTEDVALUE( 'FACT-Dishwashers2022'[Line Type] ) = "Parts", SELECTEDVALUE( 'FACT-Dishwashers2022'[Line Type] ) = "Other" ), 0, total ) return IF( filters <= 0, 0, filters )



Here's what I ended up using because I did not see your reply.  Your code looks much more simple so I will use that instead.  Thank you!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors