Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Summarize values that contain false value

Hi there,

I have this data:

ValueReady
100TRUE
200FALSE
50FALSE
175TRUE
225FALSE

 

I need to sum values that only are "FALSE" in the "Ready" column. However if I want to do this I get an error message saying that comparing true/false values it not supported when using type text.

This is my measure:

 

Sum1 = CALCULATE(sum(test1[value]) ; test1[ready] = "FALSE") 

 

How to fix this? Maybe change the true/false to something else? Or are there any other options?

 

Thanks!

  • Anonymous's avatar
    Anonymous
    6 years ago

    amitchandak Still not working. If I use data type as text and use Sum1 = CALCULATE(sum(test1[value]) ;filter(test1, test1[Ready] = 0) ) it doesn't work

    If I use data type as it was (true/false) and use Sum1 = CALCULATE(sum(test1[value]) ;filter(test1, test1[Ready] = FALSE()) ) it also doesn't work.

    So I think I have to make a new column with conditional formatting based on the ready column and change the "TRUE" to "Yes" and "FALSE" to "No" 

5 Replies

  • Check the data type Ready column. That should be text. This formula seem fine.

    or you can try

    Sum1 = CALCULATE(sum(test1[value]) ;filter(test1, test1[Ready] = "FALSE") )

    or

    Sum1 = CALCULATE(sum(test1[value]) ;filter(test1, test1[Ready] <> TRUE()) )

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak  Thanks for the help. If I change the data type of the ready column to text, the true and false changes to 1 and 0.  If I use your solution, doesn't matter if I filter to "false" or 0, it does not work. I get the same error message!

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous 

        Try like

        Sum1 = CALCULATE(sum(test1[value]) ;filter(test1, test1[Ready] = FALSE()) )

        Sum1 = CALCULATE(sum(test1[value]) ;filter(test1, test1[Ready] = 0) )

         

        What is Data type , if it showing as of now