Forum Discussion
Conditional formatting in Dax Error (comparison T/F to Number)
Hi all,
I am making a measure based off a filtered visual on the dashbaord so it gives a grade. I made the measure to get the information from the visual I need help getting the conftional formatting correct becsue I get this error.
" MdxScript(Model) (16, 13) Calculation error in measure 'COAParameterRawScore[Measure]: Dax comparison operations do not support comparing values of type True/False with values of type Number. Consider using the VALUE or FORMAT function to convert one of these values.
here are the code slices:
Any and all help is appericated. 🙂
Hi BigESloth - can check below measure:
MEASURE =
IF (
[Filter] > 92.5,
"A",
IF (
AND([Filter] > 85, [Filter] <= 92.5),
"B",
IF (
AND([Filter] > 77.5, [Filter] <= 85),
"C",
"D"
)
)
)hope it works, if any please share sample data or pbix file for reference.
- Anonymous1 year ago
Hi rajendraongole1 ,thanks for the quick reply, I'll add more.
Hi BigESloth ,
I've taken a general look at your dax expression for this part, and I don't think there's anything wrong with it.
I think the mistake should be here.
85 < [Filter] && [Filter] <= 92.5,Best Regards,
Wenbin Zhou
2 Replies
- rajendraongole1
Super User
Hi BigESloth - can check below measure:
MEASURE =
IF (
[Filter] > 92.5,
"A",
IF (
AND([Filter] > 85, [Filter] <= 92.5),
"B",
IF (
AND([Filter] > 77.5, [Filter] <= 85),
"C",
"D"
)
)
)hope it works, if any please share sample data or pbix file for reference.
- AnonymousNot applicable
Hi rajendraongole1 ,thanks for the quick reply, I'll add more.
Hi BigESloth ,
I've taken a general look at your dax expression for this part, and I don't think there's anything wrong with it.
I think the mistake should be here.
85 < [Filter] && [Filter] <= 92.5,Best Regards,
Wenbin Zhou