Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to display last 12 months

I've looked at a bunch of forums and a bunch of methods to display last 12 months in a chart, but none of them seem to work for me. Can someone please describe an appropriate way of doing this so that the last 12 months will refresh when data arrives.

Attached a sample file of data:

3 Replies
jerem1234
Specialist II
Specialist II

See if attached gets what you want. In the script I made sure the date is in a date format with:

date#(Date, 'YYYYMMDD') as Date

Then in the expression, I used the formula:

sum({<Date = {'>$(=addmonths(max(Date), -12))'}>}Value)

With a dimension of date.

Please find attached.

Hope this helps!

Not applicable
Author

thanks jerem . Cant open your qvw, but I will try with what you have posted.

Not applicable
Author

This looks good  Jerem. What if I wanted to apply a month over month % change? I dont think I can use a stringht column approach because I want the last month that I am showing to have a % change from prior that is not being diaplyed in the chart.