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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
t_guet01
Helper I
Helper I

How do I create a measure ignoring filters inside a table and keep selected filters outside?

Hey guys,

 

I am currently facing an issue that I use measures in a table, which should only consider certain filters but not all filters applied. I tried many combinations of all, allexcept, allselected, and removefilters, but I am not getting there.

 

The target table should look as follows:

 

CustomerProductSales# Storages
AP12003
AP24003
BP13002
............

 

My target:

- I would like the measure "Sales" to respect the filtering within the table, so "Customer" and "Product" dimension. I would also like the measure to respect the filters "Year" and "Product" from outside, but no others filters (e.g. "Sales Region")

- I would like the measure "Storages" to respect only filtering by "Customer" within the table (but not "Product") and only "Year" and "Products" from outside the table (but not "Sales Region" etc.).

 

Current measures:

- Sales = SUM ( 'Orders'[Net] )

- Storages = Countdistinct ( 'Orders'[StorageID] )

 

Filter pane: 

- Year = 2022

- Products: P1 and P2

- Sales region: EMEA

- ... (more filters)

 

My input data look as follows:

 

Orders:

CustomerIDProductIDDateNetStorageID
C98714785201.01.202210S123
C65436925802.01.202215S456

 

Customer data:

CustomerIDCustomerNameSales Region...
C987AEMEA...
C654BLATAM...

 

Product data:

ProductIDProductName...
147852P1...
369258P2...

 

How do I need to edit the measures to have the aimed effect?


Thanks and best

T

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @t_guet01,

I'd like to suggest you take a look at the following blog about all functions that can be used to ignore the specific filter effects.

Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT - SQLBI

In addition, you can also consider breaking or turning off the 'active' relationships and use TREATAS or USERELATIONSHIP functions to calculate with specific filter effects in your expression.

Power BI USERELATIONSHIP vs TREATAS - Enterprise DNA

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @t_guet01,

I'd like to suggest you take a look at the following blog about all functions that can be used to ignore the specific filter effects.

Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT - SQLBI

In addition, you can also consider breaking or turning off the 'active' relationships and use TREATAS or USERELATIONSHIP functions to calculate with specific filter effects in your expression.

Power BI USERELATIONSHIP vs TREATAS - Enterprise DNA

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.