Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
120 | |
101 | |
71 | |
61 |