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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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