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.
Hi there,
I have this data:
Value | Ready |
100 | TRUE |
200 | FALSE |
50 | FALSE |
175 | TRUE |
225 | FALSE |
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!
Solved! Go to Solution.
@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"
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()) )
@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
@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:
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
93 | |
83 | |
70 | |
65 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |