Forum Discussion
Anonymous
4 years agoNot applicable
How can I fix this error in DAX code?
The below is a column created with DAX, which checks whether the value in the "Value" column is more than the "Min" column and less than the "Max" column, and will will display "In Limits" if this is...
- 4 years ago
Anonymous , Try this one:-
CL OOL = SWITCH ( TRUE (), AND ( IFERROR ( INT ( Panel[Value] ), "Not Running" ) >= Panel[Min], IFERROR ( INT ( Panel[Value] ), "Not Running" ) <= Panel[Max] ) || Panel[Index] IN { 91, 92, 93, 94 }, "In Limits", IFERROR ( INT ( Panel[Value] ), "Not Running" ) = "Not Running", "Not Running", "OOL" )
Samarth_18
Community Champion
4 years agoAnonymous ,Pls try now:-
CL OOL =
VAR result =
IF (
AND ( INT ( Panel[Value] ) >= Panel[Min], INT ( Panel[Value] ) <= Panel[Max] )
|| Panel[Index] IN { 91, 92, 93, 94 },
"In Limits",
"OOL"
)
RETURN
IFERROR ( result, "Not Running" )
Anonymous
4 years agoNot applicable
Thanks Samarth_18 ,
It still seems to return the same error though. Here is a picture of some of my data if it helps.
- Samarth_184 years ago
Community Champion
Anonymous , Try this one:-
CL OOL = SWITCH ( TRUE (), AND ( IFERROR ( INT ( Panel[Value] ), "Not Running" ) >= Panel[Min], IFERROR ( INT ( Panel[Value] ), "Not Running" ) <= Panel[Max] ) || Panel[Index] IN { 91, 92, 93, 94 }, "In Limits", IFERROR ( INT ( Panel[Value] ), "Not Running" ) = "Not Running", "Not Running", "OOL" )- Anonymous4 years agoNot applicable
Thanks, it works now!