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 September 15. Request your voucher.

Reply
Samkar78
Helper I
Helper I

Dax Measure with multiple filters and a global NOT condition

Hi,

 

I'm trying to combine 2 filters on 2 differents tables with an overall NOT condition.

I exacly want the opposite of this measure :

CALCULATE([embauche turnover],
    Filter('Ref Motif entrée', 'Ref Motif entrée'[Code motif entrée]="10") ,
    Filter(Calendrier, Calendrier[Jour] = DATE("2023","01","01"))
    )

I imagine something like :

CALCULATE([embauche turnover], NOT(
    Filter('Ref Motif entrée', 'Ref Motif entrée'[Code motif entrée]="10") ,
    Filter(Calendrier, Calendrier[Jour] = DATE("2023","01","01")))
    )

But of course it doesn't work...
1 ACCEPTED SOLUTION
WinterMist
Impactful Individual
Impactful Individual

@Samkar78 

 

In the dummy example provided, the following DAX returns the desired result:  67 - 15 = 52.

 

WinterMist_0-1689086100290.png

 

Hopefully this is helpful to you.

Nathan

View solution in original post

7 REPLIES 7
Samkar78
Helper I
Helper I

Thanks a lot !!!
As simple as that... when you know the solution  😁

WinterMist
Impactful Individual
Impactful Individual

LOL!  I know the feeling.

 

NOTE: Any time you can show a small dummy example of data along with a visual of the desired results, it always helps!

WinterMist
Impactful Individual
Impactful Individual

@Samkar78 

 

In the dummy example provided, the following DAX returns the desired result:  67 - 15 = 52.

 

WinterMist_0-1689086100290.png

 

Hopefully this is helpful to you.

Nathan

Samkar78
Helper I
Helper I

Hi Nahan,

 

According to your dummy figures, I'm looking for all except the Yellow.
67-15 = 52

thanks

 

Sam

WinterMist
Impactful Individual
Impactful Individual

@Samkar78 

 

I created the following dummy table to hopefully understand your desired result better.

 

WinterMist_0-1689083190086.png

 

There are only 3 rows (yellow) where both conditions are met:

- Code = 10

- Date = 1/1/2023

 

There are 4 other rows (orange) where 1 of the 2 conditions is met.

 

For the remaining rows (no color), neither condition is met.

 

For my measure [Sales Amount], I'm just doing a SUM('Data'[Sales]).

 

For this new NOT condition measure, can you tell me what the expected result should be in this dummy scenario?

 

Should the expected result be:

- 52 (Total 67 - Yellow 15 = 52) OR...

- 27 (Total 67 - Yellow 15 - Orange 25 = 27) OR...

- Other?

 

Regards,

Nathan

Samkar78
Helper I
Helper I

Hi,
No it doesn't retreive the right result.

I want to exlude the data from that particular date AND this specific [Code motif entrée] 

The double filter with the <> condition exlude data from this Date and all the "10" [Code motif entrée] 

WinterMist
Impactful Individual
Impactful Individual

@Samkar78 

 

Would the following work?

 

CALCULATE([embauche turnover],
    Filter('Ref Motif entrée', 'Ref Motif entrée'[Code motif entrée] <> "10") ,
    Filter(Calendrier, Calendrier[Jour] <> DATE("2023","01","01"))
    )

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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