Forum Discussion
DAX simple IF statement not working
This is driving me completely nuts since hours! I am trying to create a very simple DAX IF statement:
Measure = IF([AMS] > 0, 100, 0)
But as soon as I hit enter after writing the measure, it replaces the above with:
Measure = IF([AMS] > 0. 100. 0)
"AMS" is another measure, decimal number.
It replaces the commas with points??? Why on earth?? And then it complains about "unexpected expressions"...
I have tried adding parentheses around the logical expression, and also using other measures and fields and the same happens every time. Version: 2.90.1081.0 64-bit
Hi Anonymous ,
Believe that you have the option to have the regional settings overlapping your power bi so the separator of the syntax is the dot-comma you need to change your settings, in the options:
3 Replies
- MFelixSuper User
Hi Anonymous ,
Believe that you have the option to have the regional settings overlapping your power bi so the separator of the syntax is the dot-comma you need to change your settings, in the options:
- AnonymousNot applicable
OMG... I lost hours on this one... why does that option even exist if it creates that kind of weirdness?
I did play with the regional settings options in the hope that it would fix my number formatting issues when my report gets published (lost a few more hours on that issue and found no solution whatsoever).
- MFelixSuper User
Hi Anonymous ,
Previously Power BI assumed only the regional settings, this caused also a lot of issues, so in this case they are just giving the option to have a standar (. and , ) or your regional settings.
But I agree with you that overall everything around PBI and regional settings is confusing a lot of things in PBI.