Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikview Team
I have data as below and i have to show last 12 month sales based selection in Effective_Mth field
i have created two variable
vP12YrMth= Date(AddMonths(max(Effective_Mth),-11),'MMM YYYY')
vMaxMth = Max(Effective_Mth)
I use below expression for in chart : sum({<Effective_Mth={">=$(vP12YrMth)<=$(vMaxMth)"}>}Sales). My last 12 month sales it cannot go beyond Nov'14 that means that when click Sept '15 in (effective_mth field) it shows from Sept 15 to Nov 14 only (11 mth sales). even when i click Feb'2014 (effective_mth field) it has shows only Nov 2014 sales only. it cannot show any sales after Nov 14. i have load all the data and shows everything in calendar
Please guide me how to fix it
TransDate | Sales | Effective_Mth |
1/1/2014 | 100 | Jan 2014 |
2/1/2014 | 200 | Feb 2014 |
3/1/2014 | 300 | Mar 2014 |
4/1/2014 | 400 | Apr 2014 |
5/1/2014 | 500 | May 2014 |
6/1/2014 | 600 | Jun 2014 |
7/1/2014 | 700 | Jul 2014 |
8/1/2014 | 800 | Aug 2014 |
9/1/2014 | 900 | Sep 2014 |
10/1/2014 | 1000 | Oct 2014 |
11/1/2014 | 1100 | Nov 2014 |
12/1/2014 | 1200 | Dec 2014 |
1/1/2015 | 1300 | Jan 2015 |
2/1/2015 | 1400 | Feb 2015 |
3/1/2015 | 1500 | Mar 2015 |
4/1/2015 | 1600 | Apr 2015 |
5/1/2015 | 1700 | May 2015 |
6/1/2015 | 1800 | Jun 2015 |
7/1/2015 | 1900 | Jul 2015 |
8/1/2015 | 2000 | Aug 2015 |
9/1/2015 | 2100 | Sep 2015 |
10/1/2015 | 2200 | Oct 2015 |
11/1/2015 | 2300 | Nov 2015 |
12/1/2015 | 2400 | Dec 2015 |
1/1/2016 | 2500 | Jan 2016 |
2/1/2016 | 2600 | Feb 2016 |
3/1/2016 | 2700 | Mar 2016 |
4/1/2016 | 2800 | Apr 2016 |
5/1/2016 | 2900 | May 2016 |
6/1/2016 | 3000 | Jun 2016 |
7/1/2016 | 3100 | Jul 2016 |
8/1/2016 | 3200 | Aug 2016 |
9/1/2016 | 3300 | Sep 2016 |
10/1/2016 | 3400 | Oct 2016 |
11/1/2016 | 3500 | Nov 2016 |
12/1/2016 | 3600 | Dec 2016 |
Try this expression:
Sum({<Effective_Mth={">=$(=vP12YrMth)<=$(=vMaxMth)"}>}Sales)
While changing your second variable to this:
=Date(Max(Effective_Mth), 'MMM YYYY')