Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to calculate the current and previous quarter comparison.
I have Quarter and Year field in data . how to find the Previous Quarter?
Eg:
Year Quarte Name,Sales
2016,Q4,ABC,200
2016,Q3,XYZ,500
2016,Q4,QWE,600
2017,Q1,PQR,700
For Current Quarte I am usingg the below Formula;
VRepoYear =max(Year)
VRepoQtr = Maxstring(Quarter)
sum({<Year={$(=$(VRepoYear))},Quarter={$(=$(VRepoQtr))}>}Sales) |
Please help me to find the Previous Quarter .Based on the selection your Quarter and year will be change.
Thanks
Ideally you should create a date field in the model. However, you can try like showed in attached qvw.
Hi ,
I tried with my sample data may be it will help u i think
Hi ,
in your data you have Date field, but we don't have date field, we have Quarter and Year based on that we have calculate the Current and previous comparison.
Ideally you should create a date field in the model. However, you can try like showed in attached qvw.
Try to create a date which represents your quarter then it will workout i
think
For creating date we need month, but in our data we don't have month field, can you please help me how to create date with the help of quarter and year
Did you check the solution I proposed in the attached qvw above? Using Quarter and Year field you can create date like:
Load
MakeDate(Year, Right(Quarter,1)*3) as Date
Right(Quarter,1) as QtrNum,
Quarter,
Year
From <>;
Thanks For you help
with the hepl of date i am not getting correct resuly, but the above qvw helps to get the correct result
Hi Tresesco,
can i Use same approach here for my issue ?
Prior Quarters & month growth% calculation in pivo... - Qlik Community - 1984501
Vikas