Forum Discussion
Anonymous
3 years agoNot applicable
calculated columns within a measure
Hi,
I am trying to calculate the median of a value based on some conditions.
This is my dax which i am trying with:
Median =
var med = CALCULATE(IF([Fixed_Rate_CY]<0,0,IF([Fixed_Rate_CY]>0.10,0,[Fixed_Rate_CY])))
var med1 = CALCULATE(IF([Fixed_Rate_CY]>0.10,MEDIAN(med),med))
return med1
As MEDIAN function only accepts column refrence, it gives me an error.
please suggest how to make var med as a column, so it can be used as a column to calculate the MEDIAN in var med1.
Thanks
1 Reply
- Greg_Deckler
Community Champion