0
votes

I have a custom calculation using the number of days.

<= 5 and my DAX calc is =[Total Days Aged]<=5

=6 and <=10 and my DAX calc is =([Total Days Aged]<=10)&&([Total Days Aged]>=6)

My calculation are above which are returning 'True' or 'False expressions. How can I calculate the total number of 'true' values in the column?

I've tried the following and the IF function, but I can't get it to work. =calculate(DISTINCTCOUNT(Query[0-5 Days]), Query[0-5 Days] = "True") =CALCULATE(DISTINCT(Query[0-5 Days]), Query[0-5 Days] = "True")

My error message is: "DAX comparison operations do not support comparing values type of true/false of values with type text."

Thanks in advance,

1

1 Answers

1
votes

It looks like you are trying to compare a logical true/false with a string. You should try replacing the string "True" in the query with logical value TRUE(). Try the query below.

=CALCULATE(DISTINCT(Query[0-5 Days]), Query[0-5 Days] = TRUE() )