Forum Discussion
DAX Formula IF Statement
Hi, mcornfield
First, you need to check the format of the "IF Test" field. Text cannot be compared with the value 90.
Correct results can be obtained by modifying the format of the "IF Test" field.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- AnonymousNot applicable
mcornfield how about showing us the IF statement you attempted to write, and the error you received?
- mcornfieldHelper III
Thanks for your reply i added a Screenshot to the post
- AnonymousNot applicable
mcornfield if you would click the "See details" it would tell you exactly what the problem is:
By using the "FORMAT" function in your [IF TEST] measure, you are converting that date difference into a Text data type. But then in [IF TEST 2] you are comparing that against an integer value (90), which is not allowed.
One solution would be to change your [IF TEST] measure to:IF TEST = VALUE(Today()-[9. Lastnonblank])
- v-zhangtiCommunity Support
Hi, mcornfield
First, you need to check the format of the "IF Test" field. Text cannot be compared with the value 90.
Correct results can be obtained by modifying the format of the "IF Test" field.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.