Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Can anyone explain me how the Aggr() function works with beautiful example with data in different scenarios.
B'coz i'm getting confuse on this functionality. I've gone through the reference manual also..
Thanks @John Witherspoon. Crystal clear explanation. My book Qlikview 11 for developers used a complex example to explain this concept. I am saved thanks to you.
Albert Einstein said "If you can't explain it simply, you don't understand it well enough" John Witherspoon proved it. Super Example on AGGR. thanks John
Hi John,
Can we display each bar wise 100% instead of all bars.
Very good simple explanation.
Thanks John
Best and simplest way to explain AGGR
Hi,
Since it creates a temp table.. I know if I wrap AGGR inside CONCAT.. It will give me the value of expression.. but is there any way I can get the dimensions as well.. i.e Name of Customer in the example you have provided.
Thanks,
-Kamal
Probably something along these lines?
concat(aggr(Customer&' '&max(Value),Customer),', ')
That's probably what I'd write, but I consider it a bad habit. I feel like this is technically more correct:
concat(aggr(only(Customer)&' '&max(Value),Customer),', ')
QlikView syntax lets you get away with not using only() when aggregating, whether that's a table or an aggr(), and so I almost never use only(). I believe the above expressions should behave exactly the same, but the one with only() is being explicit about what it's doing, while the other, arguably, just happens to work because QlikView syntax is a bit loose. You wouldn't get away with doing this in SQL without an aggregation function, for instance.
Thanks much johnw for your response, appreciated your help even on closed thread.
Thanks Again,
-Kamal
Thanks alot for your simple and full example of using the Aggr. Now it's clear for me.
Best regards,
Dmitry
You can try to use a Group (Year,H,Month....) and then, in expression, you can use
$(=GetCurrentField([####GROUPNAME####]))