Forum Discussion
DAX Measure with Nested IF Statements
- 9 years ago
Hey,
so it looks similar, but the DAX parser / engine sometimes is not that smart, for this reason use
AND(Issues[Created Date]>= DATE(2017,7,21) ...
instead
Regards
Thanks so much, this is very helpful! One of the examples provided is almost an identical problem. I had an add-on question that I thought I can append here:
My formula so far is:
Week Opened = SWITCH(TRUE(),
AND(Issues[Created Date]>= 7/21/2017, Issues[Created Date])<= 7/30/2017, "Week 1",
AND(Issues[Created Date]>= 7/31/2017, Issues[Created Date])<= 8/6/2017, "Week 2", "Other")
However, I'm receiving a "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 the values." error. The [Created Date] column is in fact a date and in the same format. Can you help identify what issue may be?
Hey,
so it looks similar, but the DAX parser / engine sometimes is not that smart, for this reason use
AND(Issues[Created Date]>= DATE(2017,7,21) ...
instead
Regards