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
Sisko
Helper I
Helper I

Calculation and IF not work

Hi, I have the following problem:

 

I want to check if 'Not Available' value is 0 and 'Available' values is 'Sum of Materials'. Then it is true other false.

 

Capture1.PNG

 

But when I use this IF conditionol, it not work right:

Column = IF ('WP'[Available] = 'WP'[Sum of Materials] && 'WP'[Not Available] = 0 ,
True(), FALSE()
)

 

This give me separate rows same value:

 

Capture2.PNG

4 REPLIES 4
gauravkh
Frequent Visitor

Seems like you have 2 records with ID = 0013, try aggregating the columns before comparing
Something like:

IF (SUM('WP'[Available]) = SUM('WP'[Sum of Materials]) && SUM('WP'[Not Available]) = 0 ,
True(), FALSE()

Hi, thank you for the reply. I tried your function but it not still work. It return 'True' value to all but know rows are worked right:

 

Capture3.PNG

Can you share the formula you are trying?

Column = (SUM('WP'[Available]) = SUM('WP'[Sum of Materials]) && SUM('WP'[Not Available]) = 0 ,
True(), FALSE()
)

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.