Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sofisimo
Contributor
Contributor

How to create a specific number of bins depending on cumulative values

Hi! I have a dataset with physicians names and their prescriptions by period.

I want to divide the sample in 5 equal bins that accumulate the 0-20%, 20-40%, 40-60%, 60-80% and 80-100% of the total prescriptions. 

If I had to do this in Excel I would list the physicians by their prescriptions in ascending order, accumulate them in another column, calculate the accumulated percentage and determine the 1-to-5 physician category according to the accumulated value.

I did this in Qlik Sense using the rangesum and above functions, but I haven't find a way to translate this to a bar chart like the following (red bars represent the physician count and blue bars the Rx sum):

sofisimo_0-1603805501517.png

I know there's a class function to create bins but I don't know how to define the number of bins instead their width, so as to accumulate the 20% of the Rx in each bin.

I would really appreciate if anyone could help me 🙂

Thanks in advance!!

 

 

0 Replies