Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

New Contributor

Aggr() alternative to avoid grain mismatch

I'm trying to use the aggr() function in order to calculate a metric using  this expression- sum(aggr(count({<A = 'a'>}X),Y)).

I'm using this expression in a chart object and also in  KPI box. The chart object has Finer dimension(Month leveSmiley Wink than 'A'.

Because of this the values that show up are incorrect.

Is there an alternative to aggr() to overcome this issue

Tags (2)
2 Replies
Esteemed Contributor II

Re: Aggr() alternative to avoid grain mismatch

You can use TOTAL keyword

When should the Aggr() function NOT be used?

or maybe your AGGR() isn't working because you are not using the right field!

Add another keyfield that identifies each row uniquely and then try


sum(aggr(count({<A = 'a'>}X),KEYFIELD,Y))

Re: Aggr() alternative to avoid grain mismatch

Do you have a sample you can share to see the issue?

Community Browser