cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lasselakan Advocate III
Advocate III

Make measure ignore specific filter

This should be simple but I just can’t solve it 🙂
I have a report page with several filters and a measure Amounts = SUM(Table.Amount). Now I’d like Amounts to ignore just one of the filters, a Page filter on Table.ShippingDate. By ignore I mean that Amounts should calculate as if that filter doesn’t exist. How to do this using DAX? I’ve tried everything I can think of using CALCULATE ALL, ALLEXCEPT, FILTER etc. but nothing seem to work.
Can anybody help me?

 

--- EDIT ---

I've narrowed this problem down something I've illustrated clearly in this Power BI report. Please check it out and see if you can understand why Bookmark 1-problem occurs:

https://drive.google.com/file/d/1PqKp5wjAEwHuL2UU-gUjFb39WrVas4qn/view?usp=sharing

1 ACCEPTED SOLUTION

Accepted Solutions
AkhilAshok Solution Sage
Solution Sage

Re: Make measure ignore specific filter

This is not really an issue. It is clearly explained in this article from Alberto. It is happening because of Auto Exist feature in DAX.

Besides, creating a seperate dimension table is not really a workaround, but rather a best practice. A Star Schema is always considered best when working with Power BI Datamodel. This is what makes it more powerful!

 

 

View solution in original post

25 REPLIES 25
Super User IV
Super User IV

Re: Make measure ignore specific filter

I believe what you want is the Column variant of the ALL function. 

 

https://msdn.microsoft.com/en-us/library/ee634795.aspx

 

ALL (Column[, Column[, …]])Removes all filters from the specified columns in the table; all other filters on other columns in the table still apply. All column arguments must come from the same table.

The ALL(Column) variant is useful when you want to remove the context filters for one or more specific columns and to keep all other context filters.

 

Therefore,:

 

Measure = CALCULATE([Amounts],ALL(Table[ShippingDate]))

That *should* ignore any filters on Table[ShippingDate] and preserve all other filters.

 


---------------------------------------

Not the Power BI thought police...

I have NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Lasselakan Advocate III
Advocate III

Re: Make measure ignore specific filter

Hi again

I thought so too, but in this specific case it doesn't seem to work. I narrowed it down to understand that it has to do with another filter being involved somehow!? I've created a file that illustrates this very easily with bookmarks. (Righ click and "Save link as...")

 

Download Power BI-file

Microsoft v-huizhn-msft
Microsoft

Re: Make measure ignore specific filter

Hi @Lasselakan,

Please click Format on Home page->Edit interactions->select the None(highlighted in bule line), let the ShippingDate filter does not affect the visual. It will return correct result as follows.

2.PNG

Best Regards,
Angelia

Lasselakan Advocate III
Advocate III

Re: Make measure ignore specific filter

Unfortunately that’s not a solution for me. I need to solve this in DAX.
Super User I
Super User I

Re: Make measure ignore specific filter

How about something along the lines of:

 

ignore filter  ‘column x’= IF(ISFILTERED(‘table[column x]), [measure 1], [measure 2])

 

if you don’t want to compute [measure 1], you can substitute it for BLANK() for example.




If this post has helped you, please give it a thumbs up!
Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Lasselakan Advocate III
Advocate III

Re: Make measure ignore specific filter

Thanks, but I don’t see how ISFILTERED could solve this problem!? Can you illustrate how you’d successfully apply it in the example file I posted above?
empires
Frequent Visitor

Re: Make measure ignore specific filter

Hey buddy, did you solve this problem? I'm facing the same issue on PowerBI, I have two different data segmentation filter (on date columns 'A' and 'B') and I need to completely ignore one of filters on measure, using DAX, because my measure is used on other formulas.

 

How could we solve this problem?

 

I think ISFILTERED function doesn't work because regardless of the column 'A' is filtered or not, I need to ignore filter only on that column 'A'.

manito969
Frequent Visitor

Re: Make measure ignore specific filter

 could you solve it

tananich
Frequent Visitor

Re: Make measure ignore specific filter

Hi, has anyone solved this?

I'm having smth similar in PowerBI,  I need to completely ignore one of columns in my measure, using DAX.

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors