Forum Discussion
How show quantile in matrix
- 1 month ago
Hello Klasia
PERCENTILE.INC interpolates, so it returns a synthetic value that doesn't actually exist in your data. To get the real row closest to that threshold, build a virtual table inside the measure (SUMMARIZE) it's used only for the calculation, never touches the visual, so no extra rows or slowdown.
Quantile Actual Duration =
VAR Threshold = PERCENTILE.INC('Table'[Time], 0.25)
VAR VirtualTable =
SUMMARIZE(
'Table',
'Table'[ID],
"@Time", CALCULATE(MAX('Table'[Time]))
)
VAR ClosestRow =
TOPN(1, VirtualTable, ABS([@Time] - Threshold), ASC)
RETURN
MAXX(ClosestRow, [@Time])
If my response helped you, please consider clicking
Accept as Solution β and giving it a Like π β it helps others in the community too.
Thanks,
Connect with me on:
LinkedIn |
Data With Pankaj - YouTube
Hello Klasia
PERCENTILE.INC interpolates, so it returns a synthetic value that doesn't actually exist in your data. To get the real row closest to that threshold, build a virtual table inside the measure (SUMMARIZE) it's used only for the calculation, never touches the visual, so no extra rows or slowdown.
Quantile Actual Duration =
VAR Threshold = PERCENTILE.INC('Table'[Time], 0.25)
VAR VirtualTable =
SUMMARIZE(
'Table',
'Table'[ID],
"@Time", CALCULATE(MAX('Table'[Time]))
)
VAR ClosestRow =
TOPN(1, VirtualTable, ABS([@Time] - Threshold), ASC)
RETURN
MAXX(ClosestRow, [@Time])
If my response helped you, please consider clicking
Accept as Solution β and giving it a Like π β it helps others in the community too.
Thanks,
Connect with me on:
LinkedIn |
Data With Pankaj - YouTube