Forum Discussion
DAX Formula IF Statement
- 4 years ago
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.
mcornfield how about showing us the IF statement you attempted to write, and the error you received?
Thanks for your reply i added a Screenshot to the post
- Anonymous4 years agoNot 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])- mcornfield4 years agoHelper IIII am trying to calculate Sum of Closed Accounts by Month.Days from Last Invoice= VALUE(Today()-[9. Lastnonblank])Now I need to get a SUM by Month-YearI keep getting TOTAL for some reason