Hi all, I am trying to figure out how to use a calculated measure as part of an equation for another calculated measure... Basically I'm trying to create a calculated measure to calculate the Coefficient of Dispersion (COD). Excel 2016 has this formula built in, but I'm trying to create it in my data model so that I can use it in my powerpivot tables. I have a calculated measure for median and I'm trying to use that in my COD measure, which is the Average Absolute Deviation (from the Median) / Median
So I added a calculated column to try to calculate the ABS difference for each row from the median, however when i try to use my Median Calculated measure, it returns Zero values.
My calculated Measure for median is named [MedianRatio]
The formula in the calculated column should be something like:
=ABS(MyTable[Ratio] - Median[Ratio])
I thought that if i used the median formula "median(MyTable[Ratio])" instead of the calculated measure "Median[Ratio]" in the formula, it might not adjust the median based on the pivot table filters...? ie. it would use the table median rather than the filtered sample median...?
So i guess what i'm asking is... am I wrong about how the median formula works in a calculated column? and can you not use calculated measure to derive other calculated measures?
Thanks,
joe
So I added a calculated column to try to calculate the ABS difference for each row from the median, however when i try to use my Median Calculated measure, it returns Zero values.
My calculated Measure for median is named [MedianRatio]
The formula in the calculated column should be something like:
=ABS(MyTable[Ratio] - Median[Ratio])
I thought that if i used the median formula "median(MyTable[Ratio])" instead of the calculated measure "Median[Ratio]" in the formula, it might not adjust the median based on the pivot table filters...? ie. it would use the table median rather than the filtered sample median...?
So i guess what i'm asking is... am I wrong about how the median formula works in a calculated column? and can you not use calculated measure to derive other calculated measures?
Thanks,
joe