Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
litinkumar
Contributor
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 leve;) than 'A'.

Because of this the values that show up are incorrect.

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

2 Replies
vinieme12
Champion III
Champion III

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

example

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

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
sunny_talwar

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