Qlik Community

Qlik Sense App Development

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

crossroadsit
New Contributor II

Ignore current selections within an aggr function

In Qlik Sense I'm using the following function as a measure to get a cumulative chart with two dimensions.

=aggr(rangesum(above(sum(TotalAmount), 0, rowno() )), Time.Year, [Time.Year Week])

That is working well and produces the graph shown below (I'm using some simple IF statements in the dimensions to constrain them to current/previous years and weeks to date).

Now I want to use set analysis to ignore current selections in the values. I can't figure out how to modify the function above to achieve that. Any suggestions?

2015-02-28_0222.png

1 Solution

Accepted Solutions

Re: Ignore current selections within an aggr function

=sum({1}aggr(rangesum(above(sum({1}TotalAmount), 0, rowno() )), Time.Year, [Time.Year Week]))


talk is cheap, supply exceeds demand
2 Replies

Re: Ignore current selections within an aggr function

=sum({1}aggr(rangesum(above(sum({1}TotalAmount), 0, rowno() )), Time.Year, [Time.Year Week]))


talk is cheap, supply exceeds demand
crossroadsit
New Contributor II

Re: Ignore current selections within an aggr function

Thanks Gysbert,

If I'm honest, I don't know exactly why the solution involved putting a sum() around all of it... but it does feel right and it does work.

I had tried putting {1} before TotalAmount. My grasp of set analysis, aggr and rangesum is still a bit tenuous.

Best,

Matt