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.
I have been trying to generate a calculated column within Power BI Desktop using the MEDIAN formula to get the median age. I checked to see if there were any inconsistencies like text data or blank data within the Age column but, did not find any such instances. The error message is as follows -
Expressions that yield variant data-type cannot be used to define calculated columns.
I created a median measure and no error was observed. I also ran the statistic function in the query stage and it gave me, 27 as the median age for the entire dataset. I expected the data column to have a single value equal to 27 being shown in the calculated column.
Any help will be greatly appreciated.
What is the formula for your Age column? Can you provide the file?
@Greg_Deckler The Age Column is just a number and there is no formula for the same.
The xlsx file used is shared on this link
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |