Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data from Sep 2015 to Apr 2016, I created quarter field, I want previous quarter to display but it wont work.
Thanks,
Villyee
What is your expression you are using? I am afraid you are providing too little information to be able to offer any help you. Can you elaborate and may be provide a sample?
could you please elaborate your requirement and share some sample data and outputs so that it will be helpful for us to understand
Hi Sunny,
Because of some limitations I am not able to upload actual data, however I have created dummy data as below
I have created date field which is having date from Apr 2016 to Sep 2015, now I want current vs previous quarter value but if I select Q1 of 2016 then previous quarter should be Q4 from 2015.
Product | Sales | Date |
AAA | 209 | 4/14/2016 |
BBB | 109 | 4/12/2016 |
CCC | 392 | 3/2/2016 |
DDD | 231 | 3/23/2016 |
EEE | 123 | 3/12/2016 |
AAA | 364 | 3/25/2016 |
BBB | 634 | 2/14/2016 |
CCC | 245 | 2/12/2016 |
DDD | 563 | 1/2/2016 |
EEE | 231 | 1/23/2016 |
AAA | 123 | 1/12/2016 |
BBB | 364 | 12/25/2015 |
CCC | 364 | 12/14/2015 |
DDD | 634 | 12/12/2015 |
EEE | 245 | 11/2/2015 |
AAA | 563 | 11/23/2015 |
BBB | 123 | 11/12/2015 |
CCC | 364 | 10/25/2015 |
DDD | 364 | 10/14/2015 |
EEE | 634 | 9/12/2015 |
AAA | 245 | 9/2/2015 |
BBB | 563 | 9/23/2015 |
CCC | 364 | 9/12/2015 |
DDD | 634 | 9/25/2015 |
EEE | 245 | 2/14/2016 |
Check out the attached approach
Table:
LOAD Product,
Sales,
Date,
Dual('Q' & Ceil(Month(Date)/3) & Year(Date), QuarterStart(Date)) as Quarter
FROM
[https://community.qlik.com/thread/214569]
(html, codepage is 1252, embedded labels, table is @1);
Link:
LOAD DISTINCT Quarter as ReportQuarter,
Quarter,
'CQ' as Flag
Resident Table;
Concatenate (Link)
LOAD DISTINCT Quarter as ReportQuarter,
AddMonths(Quarter, -3) as Quarter,
'PQ' as Flag
Resident Table;
Check this threads and sample QVW