Forum Discussion

Sisko's avatar
Sisko
Helper I
7 years ago

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.

 

 

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:

 

4 Replies

  • gauravkh's avatar
    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()
    • Sisko's avatar
      Sisko
      Helper I

      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:

       

      • gauravkh's avatar
        gauravkh
        Frequent Visitor

        Can you share the formula you are trying?