Hello,
I have a qlikview application in which I load the variable as follows in the load script section:
LET v_ReportWeek = '2016-W05';
I have the following requirement to develop a bar chart as follows:
Case scenario 1:
If user selects a week ('2016-W02') which is less than the v_ReportWeek, then in the same barchart I shall have displayed:
For selected week minus 1, that is Week '2016-W01' till week '2016-W04', the bar chart should show the KPI Stock. And in the same barchart, it should show the KPI 'Forcast' for v_ReportWeek plus 10 weeks in the future, that is till week '2016-W15'
Case scenario 2:
If user selects a week ('2016-W05') which is same as the v_ReportWeek, then in the same barchart I shall have displayed:
For selected week minus 1, that is Week '2016-04' , the bar chart should show the KPI Stock. And in the same barchart, it should show the KPI 'Forcast' for v_ReportWeek plus 10 weeks in the future, that is till week '2016-W15'
Case scenario 3:
If user selects a week ('2016-W04') which is less than the v_ReportWeek, then in the same barchart I shall have displayed:
For selected week minus 1, that is Week '2016-W03' till week '2016-W04', the bar chart should show the KPI Stock. And in the same barchart, it should show the KPI 'Forcast' for v_ReportWeek plus 10 weeks in the future, that is till week '2016-W15'
I also have a Period_WeekCounter associated with each week in sequence. FOr example, for week 04 in 2016, counter is 108, and for week 05 the counter is 109 and so on...
In my bar char dimension, I'm using the column Yr_Wk_Frcst as follows:
Expression is :
=if(Yr_Wk_Frcst < v_ReportWeek, sum(Stock), sum(Forcast))
but its not working as its not giving me previous week's display and future week's display correctly.
Can you please please help? its urgent.. thanks in advance
The data i use is :
OPE_WEK | OPE_YY | ItemCode | Yr_Wk_Frcst | Stock | Forcast | Period_WeekCounter |
4 | 2016 | A | 2016-W04 | 1262 | - | 108 |
4 | 2016 | A | 2016-W04 | | 1091 | 108 |
4 | 2016 | A | 2016-W05 | | 1091 | 108 |
4 | 2016 | A | 2016-W06 | | 1093 | 108 |
4 | 2016 | A | 2016-W07 | | 1095 | 108 |
4 | 2016 | A | 2016-W08 | | 1097 | 108 |
4 | 2016 | A | 2016-W09 | | 1099 | 108 |
4 | 2016 | A | 2016-W10 | | 1101 | 108 |
4 | 2016 | A | 2016-W11 | | 1103 | 108 |
4 | 2016 | A | 2016-W12 | | 1105 | 108 |
4 | 2016 | A | 2016-W13 | | 1107 | 108 |
4 | 2016 | A | 2016-W14 | | 1109 | 108 |
4 | 2016 | A | 2016-W15 | | 1111 | 108 |
4 | 2016 | A | 2016-W16 | | 1113 | 108 |
4 | 2016 | A | 2016-W17 | | 1115 | 108 |
5 | 2016 | A | 2016-W05 | 1400 | - | 109 |
5 | 2016 | A | 2016-W05 | | 2091 | 109 |
5 | 2016 | A | 2016-W06 | | 2093 | 109 |
5 | 2016 | A | 2016-W07 | | 2095 | 109 |
5 | 2016 | A | 2016-W08 | | 2097 | 109 |
5 | 2016 | A | 2016-W09 | | 2099 | 109 |
5 | 2016 | A | 2016-W10 | | 2101 | 109 |
5 | 2016 | A | 2016-W11 | | 2103 | 109 |
5 | 2016 | A | 2016-W12 | | 2105 | 109 |
5 | 2016 | A | 2016-W13 | | 2107 | 109 |
5 | 2016 | A | 2016-W14 | | 2109 | 109 |
5 | 2016 | A | 2016-W15 | | 2111 | 109 |
5 | 2016 | A | 2016-W16 | | 2113 | 109 |
5 | 2016 | A | 2016-W17 | | 2115 | 109 |