Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
suryaa30
Creator II
Creator II

Calculating Percentile

Hi I have created a chart as seen below


Cumulative Salary.PNG

Expression used:

Count =Count({<Hypothesis_Flag={'1'}>}DISTINCT Poliza)

Count %=Count({<Hypothesis_Flag={'1'}>}DISTINCT Poliza)/Count({<Hypothesis_Flag={'1'},Monthly_Salary_Updated={"*"},Monthly_Salary_Updated={">0"}>} TOTAL DISTINCT Poliza)

Cumulative Count=RangeSum(Above(Count({<Hypothesis_Flag={'1'}>}DISTINCT Poliza),0,RowNo()))

Cumulative Count%=RangeSum(Above(Count({<Hypothesis_Flag={'1'}>}DISTINCT Poliza),0,RowNo()))/Count({<Hypothesis_Flag={'1'},Monthly_Salary_Updated={"*"},Monthly_Salary_Updated={">0"}>} TOTAL DISTINCT Poliza)

Please ignore the set expression part in above expression , it is simply count (Policy)/Count(TOTAL Policy) and calculation of accumulation using range sum 

I want the expression to populate highlighted values in a text box or in a table. something like below. What is the count of policies that have salary greater than the 95th percentile and what is the 95 percentile of the salary. similarly for 96,97,98 and 99.  Please note the values populated below are dummy.

percentile 2.PNG

13 Replies
Kushal_Chawda

=IF(Monthly_Salary_Updated>0,DUAL(Replace(Class(Monthly_Salary_Updated/1000,$(vIncomeBucket)),'<= x <',' - '),Class(Monthly_Salary_Updated/1000,$(vIncomeBucket)))) &'K'


in you input box, put 30000/1000

Kushal_Chawda

would you be able to share the sample?

Kushal_Chawda

Bhai, 12 me aisa kya he?

sunny_talwar

Sortable Aggr() function which can sort based on expression