Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BooDaa
Frequent Visitor

Variable input to filtered percentile meassures - solved by writing this very post!

Hi community members!
I have been able to create some meassures based on fixed percentiles values like so

AverageAbove90thPercentile =
var limit = PERCENTILEX.EXC(ALL(Source),Source1[adjustedSlaFixTime], .9)
return
CALCULATE(AVERAGE(Source[adjustedSlaFixTime]),FILTER(Source,[adjustedSlaFixTime]>limit))

I have also created a set of variables that allow report consumers to choose a percentile from 75 to 95 via a slider.
Up to now I haven't been able to combine them, but while writing to ask for guidance the error struck me, like a two by four across the face. Over and over I have tried to push the percent figure 75-95 from my slider rather than the .75 to .9 used in the percentile calculation.
BooDaa_0-1680272917917.png

 

Error message reads Non supported percentile

When changing my COUNT, SUM or AVERAGE meassure variables from HigherPercentileParam to HigherPercentileLimit formula it worked like a charm. 😎
BooDaa_0-1680272623123.png

 


HigherPercentileParam = GENERATESERIES(75, 95, 5)
HighPercentileSelection = SELECTEDVALUE('HigherPercentileParam'[HigherPercentileParam], 0)
HigherPercentileLimit = HigherPercentileParam[HighPercentileSelection]/100

Based on this discovery my meassure was changed to:
AverageAboveVarPercentile =
var limit = PERCENTILEX.EXC(ALL(Source),Source[adjustedSlaFixTime], HigherPercentileParam[HighPercentileSelection]/100)
return
CALCULATE(AVERAGE(Source1[adjustedSlaFixTime]),FILTER(Source1,[adjustedSlaFixTime]>limit))

Please feel free to comment if you see any error in the meassures. I haven't validated it against a smaller dataset yet, so I'm not sure it is accurate.

Best regards,
Fredrik
0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors