Forum Discussion
Why does NOT() prevent converting boolean to numerical values? DAX Mysteries
- Anonymous5 years ago
Hi edhans
I followed your steps and got the same result.
What I noticed is that the data type still remained "True/False" instead os changing to Whole number unlike for "Column".
Changing it to Whole number serves the purpose.
As to why it is behaving in such way still might be a question as it follows the similar construct as "Column".
This might have to do with how Power BI internally finalises the data type.
- 5 years ago
Interesting Anonymous - good catch on the data type. I also found out that if I used it as an operator and not as a function it works without having to change the data type.
And, of course, I hit this behavior inside of a measure where you cannot change the data type, nor could you deeper in a more detailed function even inside of a calculated column. But good thinking!
Hi edhans
I followed your steps and got the same result.
What I noticed is that the data type still remained "True/False" instead os changing to Whole number unlike for "Column".
Changing it to Whole number serves the purpose.
As to why it is behaving in such way still might be a question as it follows the similar construct as "Column".
This might have to do with how Power BI internally finalises the data type.
- edhans5 years agoCommunity Champion
Interesting Anonymous - good catch on the data type. I also found out that if I used it as an operator and not as a function it works without having to change the data type.
And, of course, I hit this behavior inside of a measure where you cannot change the data type, nor could you deeper in a more detailed function even inside of a calculated column. But good thinking!