Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to calculate the sum of the 5 largest values of one dimension. I tried set analysis and Aggr fuction combined with the Rank() function but did not succeed yet.
Attached a simple example of my problem:
This sum (51,446) is what I would like to calculate in a formula to replace the static blue coloured text.
Thank you!
I'm still not sure why I was getting a different result in QV vs QS but the expression you need is this:
Copy directly into your app
SUM({<Customer={"=sum(Sales)>=$(=max(aggr(sum(Sales),Customer),5))"}>}Sales)
Hi David,
There seems something a bit odd going on here, I'm getting a different result from the same expression in QlikView vs QlikSense.
The expression below works fine in QlikView (chart or text box) but in QlikSense it just seems to pick one value for a customer. Qlik monitor these threads so hopefully someone there can explain why?
sum({<Customer = {"=rank(sum(Sales))<=5"}>} Sales)
Hope this helped, thanks.
check this thread Customers Having Top 4 Values
I'm still not sure why I was getting a different result in QV vs QS but the expression you need is this:
Copy directly into your app
SUM({<Customer={"=sum(Sales)>=$(=max(aggr(sum(Sales),Customer),5))"}>}Sales)