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

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!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@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" 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

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
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!

@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

Anonymous
Not applicable

@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" 

hi  @Anonymous 

These two measure all work well on my side.

Sum1 = CALCULATE(sum(test1[Value]) , test1[Ready] = FALSE())
Sum2 = CALCULATE(sum(test1[Value]) ,FILTER(test1, test1[Ready] = FALSE()))

Result:

1.JPG2.JPG

and here is sample pbix file, please try it.

If you still have the problem, please share your sample pbix file for us have a test.

and "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" ", it is a good solution too.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.