Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I was struggling with the formula below during several hours (reading & testing, ...) with no luck:
SUM({<[Delivery Month]={"$(=Aggr(Max({<[Quantity] ={[>0]} >}[Delivery Month]),[Part]))"}>}[Quantity])
What I want to obtain is:
So, the question is: Can I use Aggr() in nested set analysis? or maybe the approach must be different.
PS: I'm using the formula before for filling a column in a Table chart.
Thanks in advance
Yes, it is possible to use Aggr() nested. You may get a performance hit, but that's it.
However, there are some things to be aware of:
See more on https://community.qlik.com/t5/Qlik-Design-Blog/Pitfalls-of-the-Aggr-function/ba-p/1463275
Hi Henric,
Thanks for your reply. Reading your post and thanks to a colleague suggestion I found that the best approach for my requirement was to use FirstSortedValue() function. It's the first time I use it 😉
So, the formula below permits me to obtain what I want:
FirstSortedValue({<[Quantity] ={">0"}>}[Quantity],-[Delivery Month])
To be honest I don't know if I would be able to obtain the same result with my first approach but I will try it.
Have a good one
Regards