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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Imrans123
Advocate V
Advocate V

Removing filters for certain measures

Hello, 

 

Hope someone can help me out. 

 

Let's say I have a data model with a Store Table and Billings Table such that 

Imrans123_0-1658774981244.png

Imrans123_1-1658774993548.pngImrans123_2-1658775189226.png

 

Now, I want to have a scenario where I can have a store name slicer and a store state slicer. When I select a store name, it will give me the sales for the particular store and when I selected a state, it would give me the total amount for the entire state in the same visual. 

 

For instance, in the below table 

Imrans123_3-1658778907243.png

 

Store 2 should be 410 (120+140+150) while Billings (State) should be 1,050 (summation of store 1, 2 and 3 as they're all part of CA)

 

Workarounds I've tried: 

Creating two Store tables and then manually using ALLSELECTED where 

Billings = CALCULATE(SUM('Billings Table'[Invoice Amount]),ALLSELECTED('Store Table'[Name]))
Billings (State) = CALCULATE(SUM('Billings Table'[Invoice Amount]),ALLSELECTED('Store Table (2)'[State]))
Unfortunately, it doesn't work the way I want it to as there is no filtering happening. 

 

 

1 ACCEPTED SOLUTION

Was about to delete this post 😂

 

Realized if we are using two different columns to filter, can just use removeiflters for the column which we don't want to filter. 

i.e. 

Billings (State) = CALCULATE(SUM('Billings Table'[Invoice Amount]),REMOVEFILTERS('Store Table'[Name]))
 
Whereas the state column from store table will still apply the filter and hence the state slicer will affect the measure. 
 
Thanks though!

View solution in original post

2 REPLIES 2
vapid128
Solution Specialist
Solution Specialist

add a relate colnum in Bill table.
State = related(Store Table[State])

Or

Billings (State) = 

var _State = SELECTEDVALUE('Store Table (2)'[State])


CALCULATE
(
    SUM('Billings Table'[Invoice Amount]),
    Filter(ALLSELECTED('Billings Table'),RELATED('Store Table (2)'[State]) = _State)
)

 

And change your relationship to both.
image.png

Was about to delete this post 😂

 

Realized if we are using two different columns to filter, can just use removeiflters for the column which we don't want to filter. 

i.e. 

Billings (State) = CALCULATE(SUM('Billings Table'[Invoice Amount]),REMOVEFILTERS('Store Table'[Name]))
 
Whereas the state column from store table will still apply the filter and hence the state slicer will affect the measure. 
 
Thanks though!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.