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.
Hello
I have this simple column for which I am trying to calcualte a MEDIAN value as below.
But it gives an error saying -- "Expressions that yield variant data-type cannot be used to defined calculated columns"
Any inputs on this?
Solved! Go to Solution.
hmm, for even number of items median can be decimal number even if it's based on Whole numbers.
can you try switching data type to Decimal with format as Whole?
I'm not 100% sure, but I think that you need to change the data type of Column1 from Any to Number
are you sure it's the data type and not format? they're just next to each other in the UI
unless you changed it in the query editor, then it must be something else - are there any non numeric values in that column?
Yup, both are "Whole Number". See below -
There are no non-numeric values in this column. My earlier screenshot shows all the values available for this column.
hmm, for even number of items median can be decimal number even if it's based on Whole numbers.
can you try switching data type to Decimal with format as Whole?
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |