Forum Discussion
Percentile category
Yes, the typo nailed me...I stared at that for a long time and figured it out...then tried to remove my post so not to bother folks. Anyway, it worked great, eh?
Further to this example, is there a way of using a measure result directly in the "K" argument of the percentile function?
Where in the following example; 'Band' is a 10 row table with columns [BandNumber] of values 1-10 and [K Perc] of values 0, 0.1, 0.25, 0.45, 0.5, 0.55, 0.75, 0.9, 0.95, 1
eg K Perc Result := IF(HASONEVALUE(Band[K Perc]),VALUES(Bands[K Perc]),0.5)
PercentileBandResult:= CALCULATE
(PERCENTILEX.INC(FactTable, FactTable[Column],[K Perc Result]), // other filters, //)
or should a VARiable be used within the measure to explicitly return a value to the percentile function e.g
VAR
KValue = IF(HASONEVALUE(Band[K Perc]),VALUES(Band[K Perc]),
SWITCH (Band[K Perc],
"0" = 0,
"0.1" = 0.1,
etc,
etc,
"1" = 1,
//if all the above fail //,0.5)
RETURN
PercentileBandResult:= CALCULATE
(PERCENTILEX.INC(FactTable, FactTable[Column],KValue, // other filters, //)