Forum Discussion
poojik
8 years agoFrequent Visitor
Error: DAX comparison operations do not support comparing values of type true/false
I am trying to create a new calcuated field to count all the account names if "ValidationStatus" is TRUE. The formula I am using is : Validated count = CALCULATE(DISTINCTCOUNT(accounts[name]),FI...
Anonymous
6 years agoNot applicable
Can someone help me please. I have the following code and I keep getting this error. I have tried wrapping the calculate statement in a VALUE function and I get the message, cannot convert true/false.
Inpatient comment =
var newline2 =
"
"
return
if(
CALCULATE([Per Member % Change],'Benefit Mapping'[Benefit Type]="inpatient">0.05),"Inpatient Costs:" & newline2 & "The average inpatient cost per member has increased year-over-year by " &FORMAT(CALCULATE([Per Member % Change],'Benefit Mapping'[Benefit Type]="inpatient"), "currency")& ". IP costs are sporadic in nature and can significantly increase or decrease overall costs; in this instance, IP increased overall costs",
if (
AND(CALCULATE([Per Member % Change],'Benefit Mapping'[Benefit Type]="inpatient")<=0.05,CALCULATE([Per Member % Change],'Benefit Mapping'[Benefit Type]="inpatient")>=-0.05 ),"inpatient Costs: " & newline2 & "The average inpatient cost per member has been roughly stable year-over-year (" &FORMAT(CALCULATE([Per Member % Change],'Benefit Mapping'[Benefit Type]="inpatient"), "currency")& " change year-over-year. IP costs are sporadic in nature and can significantly increase or decrease overall costs; in this instance, IP had minimal impact on overall costs",
"Inpatient Costs:" & newline2 & "The average inpatient cost per member has decreased year-over-year by " &FORMAT(CALCULATE([Per Member % Change],'Benefit Mapping'[Benefit Type]="inpatient"), "currency")& ". IP costs are sporadic in nature and can significantly increase or decrease overall costs; in this instance, IP reduced overall costs"
))