Qlik Community

QlikView Extensions

Discussion Board for collaboration on QlikView Extensions.

Highlighted
darrihilmarsson
New Contributor III

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    
Tags (2)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Chart that shows last 12 YearPeriod (last 12 months)

Hi,

Check this link

Set Analysis for certain Point in Time

Regards,

Jagan.

2 Replies
kiranmanoharrode
Contributor III

Re: Chart that shows last 12 YearPeriod (last 12 months)

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

MVP & Luminary
MVP & Luminary

Re: Chart that shows last 12 YearPeriod (last 12 months)

Hi,

Check this link

Set Analysis for certain Point in Time

Regards,

Jagan.