Forum Discussion
ALL() ??
Assuming two tables names Hospitals and StandardizingFile, I suggest adding a calculated column to the Hospitals table.
The column should look like this.
= VAR CMI = RELATED( StandardizingFile[CMI] )
VAR MedianForSameSize = MEDIANX(
FILTER( Hospitals
, [Size] = EARLIER( [Size])
&& NOT(ISBLANK(RELATED( StandardizingFile[CMI])))
)
, RELATED( StandardizingFile[CMI] )
)
RETURN IF( NOT(ISBLANK(CMI)), CMI, MedianForSameSize )You can then aggregate this column as want, if you want to make a measure out of it.
LaurentCouartouSorry for the tardy reply--I was completely out of reach of the internet or cell for 9 days. It was pretty great but I'm just back. Thank you for this. Good idea to push to a column and I've not used Earlier so it will be a nice learning experience for me. Thank you for your time and effort.
I've put it into the column and it computes...and I'll need to adapt it a bit. Right now, the medians for each bed size category are not consistent. Let me work with it...it's a nice approach so thank you.
Tom