Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis date with aggr function

Hi,

I need some help with ignoring selections.

my expression is:

sum({<Year=, Date={">=$(=AddMonths( YearStart (Today()),-12))<=$(=AddMonths( MonthEnd (Today()),-12))"}>} aggr( invQTY, invID, invQTY))

In this expression I want to ignore the year, but it doesn't work.

If I replace: aggr( invQTY, invID, invQTY) with: invQTY, it's working.

What am I doing wrong?

Thanks.

Labels (1)
1 Reply
sunny_talwar
MVP
MVP

May be try this:

Sum({<Year=, Date={">=$(=AddMonths( YearStart (Today()),-12))<=$(=AddMonths( MonthEnd (Today()),-12))"}>} Aggr(Only({<Year>} invQTY), invID, invQTY))