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.
Hi,
I have created a calculated column using the PERCENTILE.INC-function, but I get this error message:
Expressions that yield variant data-type cannot be used to define calculated columns.
If I wrap the VALUE-function around the expression, it works fine.
But why does the PERCENTILE.INC-function return a variant data-type?
regards,
Sturla
Solved! Go to Solution.
Likely has to do with your data. https://docs.microsoft.com/en-us/dax/percentile-inc-function-dax
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Check the return values.
Likely has to do with your data. https://docs.microsoft.com/en-us/dax/percentile-inc-function-dax
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
So, when the input-column is data type decimal number, the PERCENTILE-function works fine. When the input-column is data type whole number, the error "Expressions that yield variant data-type cannot be used to define calculated columns." occurs. And wrapping the VALUE-function around it fixes it.
I don't understand why it throws this error, and why wrapping VALUE around it fixes it. From the documentation I cannot find any explanation for this behaviour. Any thoughts?
Check the return values.
Covering 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 |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |