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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ed7
Employee
Employee

DAX how to remove filters from more than one table with ALL/ALLExept

I need in the Filter() remove filters from a number of tables, but ALL and ALLExcept can remove filters only from one. Any workarounds? 

____

Here is the problem I'm trying to solve: I need to find a first month when customer purchased for more than specific amount lets say 100$.

Formula: CALCULATE(FIRSTDATE('Calendar'[Month]), Filter(ALL('Calendar'),[Revenue]>100))

 

This formula works well but when I click slicer to filter to specific product on the report page, the calcualtion shows the first month when customer purchased that specific product for 100$+, but I don't want the slicer to impact this measure. 

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

Hi, @ed7 ,

Indeed FILTER() accepts only one filterExpression, but all-mighty CALCULATE(), in theory, is capable of coping with as many as filters.

I hope this verbose measure may solve your issue which you mentioned

CALCULATE (
    FIRSTDATE ( 'Calendar'[Month] ),
    FILTER ( ALL ( 'Calendar' ), CALCULATE ( [Revenue], ALL ( product ) ) > 100 )
)

Better attach a dummy file so that your issue is demonstrated much more clearly and could possible be sooner to be solved by gurus here.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

Hi, @ed7 ,

Indeed FILTER() accepts only one filterExpression, but all-mighty CALCULATE(), in theory, is capable of coping with as many as filters.

I hope this verbose measure may solve your issue which you mentioned

CALCULATE (
    FIRSTDATE ( 'Calendar'[Month] ),
    FILTER ( ALL ( 'Calendar' ), CALCULATE ( [Revenue], ALL ( product ) ) > 100 )
)

Better attach a dummy file so that your issue is demonstrated much more clearly and could possible be sooner to be solved by gurus here.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

wdx223_Daniel
Super User
Super User

i think you can add a calculatetable out of the filter(), and remove any filter you want by adding filter statement

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors