Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Would like to present the last 12 month in a bar chart

Hi.

I have a bar chart and I would like to always present 12 month depending on selection in Years and Months.

If I select Year = 2017 and Month = 05 I would like to see --> would like to see month from 201605-201704

Regards Mikael

2 Replies
techvarun
Specialist II
Specialist II

Sum({$<Month=, Year=, Date={">=$(=MonthStart(AddMonths(Max(Date),-12)))<$(=MonthEnd(Max(Date)))"}>} Sales)

venelin_rs
Contributor III
Contributor III

Hi Mikael,

If I understood correct, next statement has to be work.


Sum({$<Month=, Year=, Date={">=$(=MonthStart(Min(Date)))<$(=MonthEnd((AddMonths(Min(Date)), 12))"}>} Sales)