2 Replies Latest reply on Sep 22, 2016 4:32 PM by Gaurav Agrawal

# Trying to calculate average of numbers falling in X percentile limit

Hi, I have a calculated field, and I am trying to calculate average from that calculated filed of numbers that are under X percentile. Could someone please help in figuring this out...will really appreciate it.

Thank you!

• ###### 1. Re: Trying to calculate average of numbers falling in X percentile limit

Hi Gaurav! One way you could do this is to use a LOD calculation to get the percentile, then use that calculated field to filter out values above X. In case you don't know anything about LOD calculations, look here: Overview: Level of Detail Expressions

You would probably use something like this:

[Whatever Measure] < { PERCENTILE([Whatever Measure], X) }

• ###### 2. Re: Trying to calculate average of numbers falling in X percentile limit

Thank you, David.

When I am trying to go with: (A-B)*24 < {Percentile((A-B)*24), 0.9)}

I don’t see any errors but the percentile calculated with above for some reason shows the 10th percentile instead of 90th percentile. What am I doing wrong here?