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
Anonymous
Not applicable

DAX - Calculate Measure ONLY if another measure = 0

Hi there!

I have two measures, [Promo Vol] and [Total Vol] - you can see the results in this table

 

Capture.PNG

I just want to create another measure that will sum up the [Total Vol] but ONLY in cases where [Promo Vol] > 0

So in this case the output value I'm looking for is £334,948 (i.e. sum of everything in [Total Vol] except the last two rows because the Promo Vol is 0

Does anyone have any suggestions?

 

Thanks

 

Alex

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a measure like

sumx(values(Table[Date]), if([Promo Vol] > 0, [Total Vol],blank()))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try a measure like

sumx(values(Table[Date]), if([Promo Vol] > 0, [Total Vol],blank()))

Anonymous
Not applicable

Legend, thank you! 😘

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.