Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have a Date field called OrderDate.
From this OrderDate I dervice which Quarter a particular date is in.
What I would like to do is get the next Quarter from a selected OrderDate.
Currently I calculate a Quarter field in the script using 'Q' & CEIL(MONTH(TempDate) / 3) AS Quarter as part of standard master calendar.
Any idea how to get the next quarter?
Ultimately I want to use this in Set Analysis where I can show me Orders for this quarter and next quarter.
You can easily create the quarter in the backend then use the field in your set analysis
Hi there,
Thanks for this, however my requirement is to get the next Quarter as a value from a selected date.
Any suggestions from anyone?
Hi
Create a master calendar and link your transactions to master calendar which will create date variables and fields further can be used in set analysis to calculate the required refer this link
Vikas
Made the something you looking for.
Please find the attached document it might be of help
Hi there,
I already have a master calendar.
This is not the issue.
What I want to know is, how can I get the next Quarter name as a value from the selected Order Date.
E.g. If I select 23/05/2017 then the current quarter is Q2.
The next Quarter value is Q3. I want this.
If I select 24/12/2016 then the current quarter is Q4, the next Quarter value is Q1. I want to hold this next Quarter value somewhere.
Try something like this -
'Q' & CEIL(MONTH(AddMonths(Max(Month_Date),3)) / 3)
='Q' & left(QuarterEnd([Order Date], 1),1)/3
Please try the above expression.
HTH
Hi John,
Try using Autonumber function to create a unique number for each of your quarters and then you can easily use simple arithmetic expressions to get the required output.
LOAD *,
AutoNumber(Quarter&Year) as QuarterNumber;