Forum Discussion
simple median across a row
- 4 years ago
you can add a calculated column like
median time = MEDIANX ( { 'Table'[first_time], 'Table'[second_time], 'Table'[third_time] }, [Value] )
Thanks johnt, so you are sort of building a table with those three columns? And then getting the median along the row of interest? Is that what is happening?
I see you need to convert it to an int or you will get an error.
Also finally, when there is 2 numbers, shouldn't it give the average? Seems to just give the lowest value.
Yes, it needs to create a table as all the aggregation functions work on tables, and the values would need to be some sort of numeric type ( whole number, currency, % etc ).
If there is an even number of rows in the table then MEDIANX will return the average of the 2 rows in the middle.
- axecap4 years agoFrequent Visitor
Thanks john, in my case it seems like it was treating the empty values as a zero or something. That is something i'll just have to keep in mind! Thank you again!