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
michael_ma
Frequent Visitor

Can anyone explain why my power bi Dax expression is not working?

Hi everyone,

I have this dax expression: 

Exclude = CALCULATE (
    IF (
        MAX ( 'Products'[Product Line] ) = "Keys"
            && [Invoice Gross Amount] = 0,
        TRUE (),
        FALSE ()
    ),
    ALLEXCEPT (
        'Transactions',
        'Transactions'[Document Number]
))
 
This Dax runs but when I check the table it's not doing what I expected it to be doing. The values are still coming in as False when I'm expecting them to be True. 
michael_ma_0-1704825380118.png

 

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@michael_ma Why not just:

Exclude = 
    IF (
        MAX ( 'Products'[Product Line] ) = "Keys"
            && [Invoice Gross Amount] = 0,
        TRUE (),
        FALSE ()
    )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

I appreciate replying to me! I need to include the all except because I still want exclude all filter context except for Document Number 

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.