Qlik Community

Qlik Sense App Development

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

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Aggr Function Issue

IN Qlik Sense I am using the below expression

Sum(Aggr(FABS((
Sum({<Date={"$(=Date(Max([Date)))"}>} Amount)
-
Sum({<Date={"$(=Date(Max([Date)-1))"}>} Amount)))),Dim A, DimB))

This gives me a correct result but once I start selecting different dates it spins for a long time cuz of this Aggr and Fabs

I tried doing the aggregate table in script but it doesnt work, 

How I can accomplish this in Script or another way for better performance.

1 Reply
Highlighted
MVP & Luminary
MVP & Luminary

Re: Aggr Function Issue

If you have ensured that you really need this aggr-expression (not for each summing is an aggr() needed - either directly or indirectly by using a different chart respectively chart-design) there won't be much potential for optimizing the expression itself.

Another point is your used datamodel - it should go in the direction of a star-scheme and if calculations are too slow it's often helpful to ensure that all included fields come from a single table.

- Marcus