Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Aggr Last 12 Months

Hi, need some help...

I need the aggr sales expression for the last 12 month...

Can some help me?

Thanks in advance,


Tags (2)
3 Replies
Honored Contributor III

Re: Aggr Last 12 Months

Try like this

Aggr({<Date_dim={"$(= '>=' & date(Today()-365) & '<=' & date(Today()))"}>}Sales,Dim)

Not applicable

Re: Aggr Last 12 Months

I formulate the question badly, I found the way in the time dimension table:

Aggr(sum(sales), MATid)

Thanks any way...


Re: Aggr Last 12 Months

I would define a relative Month already in the script:

   12*(Year(Today())-Year(Date)) + Month(Today()) - Month(Date) as MonthsAgo,

then your expression would be

   Sum({$<MonthsAgo={">=0<12"}>} Sales)

See more on:

* http://community.qlik.com/blogs/qlikviewdesignblog/2013/06/10/relative-calendar-fields

* http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/11/when-should-the-aggr-function-not-be-u...


Community Browser