Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi to all,
i need, if is possible, you help.
In the file db_bank1 i have 3 variable. Bank (A or B) , User (name of user), Euro (money).
I need a expression that for each bank:
- Calculate 40% of Total Euro=Thershold
- Cumulate euro of user (descending, from higher import of euro) and count how many user are under the threshold of 40% of Total euro of each bank.
I hope that you can uderstand my question. Explain in English is not simple...
Ask me for more details.
Thank YOU!!
Marco
Hi Marco,
if i understand your problem, you can try this expression:
count({$<user={"=Sum(euro)<(Sum(total <bank> euro)*0.4)"}>}user)
C u,
Stefano.
[update.] Sorry this works only if u select a Bank.
Hi Marco,
try
=count(aggr(if(sum(euro)<0.4*sum(total<bank> euro),user),bank,user))
I noticed that 40% is quite a high threshold in your example data set, no users are above that limit?
Regards,
Stefan
Hi,
mybe i didn't explain well my request.
The threshold of 40% is to compare with the sum of the first higher users.
In other words: i need to know how may user altogether are under the threshold of 40%.
In the Ex: for bank A are 2.
If you sum the 2 most high euro you are a little bit under 40% of euro bank A. (12269).
Thank You
Ah, you want something like a pareto count, right?
Hm, I think that there are some limitations, a good discussion thread is this:
http://community.qlik.com/thread/1668
Stefan