Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Chart that shows last 12 YearPeriod (last 12 months)

Hi, QlikView

I have data set that shows sales number and date when they happen.

I want to make a chart what shows sales numbers for last 12 YearPeriod

I will explain better. So today is 30.09.2015 which is YearPeriod 2015-9

I want the sales number to show only last 12 YearPeriod.

Then I can only see YearPeriod from 2014-10 to 2015-9.

     

DayYearWeekMonthYrWkYrPer Sales
1.1.2013201311  2013-12013-1      150.000    
10.1.2013201321  2013-22013-1      320.000    
19.1.2013201331  2013-32013-1      272.246    
28.1.2013201351  2013-52013-1      610.481    
6.2.2013201362  2013-62013-2      248.498    
15.2.2013201372  2013-72013-2      120.766    
1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

2 Replies
kiranmanoharrode
Creator III
Creator III

Hello Darri,

Create Two Variable:

1. vMaxDate = Date(Today())

2. vLast12Month = MonthStart(AddMonths(AddYear(Today(),-1),1))

Please make sure default date format in Set statement of scripting is set to DD.MM.YYYY.

Dimension:  YrWk

Expression : Sum({<Day={">=$(vLast12Month)<=$(vMaxDate)"}>}Sales)

Sort Chart by Asceding order of field Day.

Regards,

Kiran

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this link

Set Analysis for certain Point in Time

Regards,

Jagan.