Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
In the above image, I can convert the True/False in the [Value] column to a number by multiplying by 1. Great.
However, as shown above, if I wrap [Value] with NOT(), thus changing true to false and false to true, I can not convert it to a number by multiplying by 1. It stays as a true/false value.
Why is that? What am I missing?
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingSolved! Go to Solution.
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.
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
Interesting @pranit828 - 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!
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @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.
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
Interesting @pranit828 - 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!
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |