Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Day | Year | Week | Month | YrWk | YrPer | Sales |
1.1.2013 | 2013 | 1 | 1 | 2013-1 | 2013-1 | 150.000 |
10.1.2013 | 2013 | 2 | 1 | 2013-2 | 2013-1 | 320.000 |
19.1.2013 | 2013 | 3 | 1 | 2013-3 | 2013-1 | 272.246 |
28.1.2013 | 2013 | 5 | 1 | 2013-5 | 2013-1 | 610.481 |
6.2.2013 | 2013 | 6 | 2 | 2013-6 | 2013-2 | 248.498 |
15.2.2013 | 2013 | 7 | 2 | 2013-7 | 2013-2 | 120.766 |
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