

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I get the next Quarter from a selected date? Need to use it for Set Analysis to get Orders for selected date Quarter and it's next Quarter
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.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can easily create the quarter in the backend then use the field in your set analysis


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Made the something you looking for.
Please find the attached document it might be of help


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try something like this -
'Q' & CEIL(MONTH(AddMonths(Max(Month_Date),3)) / 3)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
='Q' & left(QuarterEnd([Order Date], 1),1)/3
Please try the above expression.
HTH


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
