Stratify and select top 85% of a population

Hello Knimers!!

I’ve got another challenge to solve… we’ve been asked to select all transactions in a population whose amounts represent the top 85% of the total population balance. In other words…

Sort population by amount, largest to smallest. Then select all transactions starting at the top until the running balance hits 85% of the total.

There are probably 10 different ways to go about it, so putting it to the group for recommendations.

Thanks in advance!

Hi @wpaschal

I’m thinking of something like this: select_top85.knwf (89.2 KB)
Screenshot from 2020-05-21 16-11-35
gr. Hans


Whoa, that’s it!!

Hopefully we can find each other one day so I can buy you a beer :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.