Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted

Re: workaround for nested aggregation

From what I see that you have made your expression extremely complex which can be resolved to just this for table or kpi object

=Sum(Aggr(If(Sum([Residual Receivables]) >= Sum(Sales),
	Avg([#Days]),
	Avg([Residual Receivables])/Avg(Sales)*Avg([#Days]))
, Month,Month_Lookback))

Is this what you wanted to get?

image.png

View solution in original post

supriya_rangana
New Contributor II

Re: workaround for nested aggregation

Yes, but on selection of a month, the values need to first sum up based on month_lookback. Then a simple calculation needs to be performed, which has to be summed up based on the month.

Also the expression you posted is yielding 0 in a KPI object. 

Thank you once again.

Re: workaround for nested aggregation

I selected Month = 'Feb'... and I see this

image.png

What is the issue with the above screenshot?

supriya_rangana
New Contributor II

Re: workaround for nested aggregation

Hi Sunny, 

This has been achieved in a table but the same needs to be achieved in a KPI and Bar chart and also a table, but without making use of the month_lookback as a dimension. 

Please let me know if this can be achieved.

Re: workaround for nested aggregation

Have you looked at the screen shot my friend? the KPI object is showing 117... what is the problem?

supriya_rangana
New Contributor II

Re: workaround for nested aggregation

This works.. thank you so much... 

Re: workaround for nested aggregation

Lol okay... I guess you were not even trying my suggestions, right? All of sudden it went from doesn't work to work ;).

Best of luck,
Sunny

supriya_rangana
New Contributor II

Re: workaround for nested aggregation

I think I was rushing and didn't notice it correctly. But thank you so much.. You are awesome..