4 Replies Latest reply: Oct 24, 2014 7:30 PM by Ryan Giesen

# Percentile Rank calculation

I need to calculate the percentile rank function on the fly in QV app., example see attached excel file, anyone knows how?

• ###### Re: Percentile Rank calculation

Thanks for sharing the video. But this is showing the rank only. How can I show a rank in percentile fashion? For example, I need to count how many items are within 10,20,30, 50, 90, and 95 percentile respectively. What is the equivalent function of Excel Percent Rank function in Qlikview?

• ###### Re: Percentile Rank calculation

I have a need for this same functionality.

Basically I have a list of patients and I sum up their charges based on the selections the user has made, so this calculation must be done on the fly.  This is tricky, but I am sure there is a way to accomplish this in QVW.

• ###### Re: Percentile Rank calculation

I think I figured out one way to do it...Let's say you have 2 dimensions (Dimension1 and Dimension2) and 1 expression (vExpression) in your straight table, the code would be...

Rank(TOTAL -\$(vExpression)) /

Count(TOTAL aggr(\$(vExpression), [Dimension1],[Dimension2]))

You may need to modify slightly for your specific example.  My guess is something like...

Rank(TOTAL -[Citation Counts]) /

Count(TOTAL aggr([Citation Counts], [Journal],[Year Published],[Document Type],[Year Cited]))

Hope that helps.