Forum Discussion
Bizo
3 years agoFrequent Visitor
DAX IF Statement Error
Hi All, Ihave this DAX statement below but I'm running into the below error: "DAX comparison operations do not support comparing values of type True/False with values of type Integer. Conside...
- 3 years ago
Bizo First, use a SWITCH(TRUE(),...) statement, much cleander and you have to write your true/false conditions like:
DueIn = SWITCH(TRUE(), [Days Due] < -44000, "No Due Date", [Days Due] > -44000 && [Days Due] < 0, "Overdue", [Days Due] > 0 && [Days Due] <= 30, "0 - 30 Days", [Days Due] > 30 && [Days Due] <= 60, "31 - 60 Days", [Days Due] > 60 && [Days Due] <= 90, "61 - 90 Days", "90+ Days" )
Greg_Deckler
Community Champion
3 years agoBizo First, use a SWITCH(TRUE(),...) statement, much cleander and you have to write your true/false conditions like:
DueIn =
SWITCH(TRUE(),
[Days Due] < -44000, "No Due Date",
[Days Due] > -44000 && [Days Due] < 0, "Overdue",
[Days Due] > 0 && [Days Due] <= 30, "0 - 30 Days",
[Days Due] > 30 && [Days Due] <= 60, "31 - 60 Days",
[Days Due] > 60 && [Days Due] <= 90, "61 - 90 Days",
"90+ Days"
)- Bizo3 years agoFrequent Visitor
Perfect, thanks! You're a lifesaver!