The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Create Quarter series based on one Quarter of a Year
achint_kumar
Member Posts: 16 Contributor II
Hi All,
I am trying to make a process very dynamic in terms of creating multiple series of quarters based on a quarter input
Example:
I have a date for eg: 01/04/2019.
The above date falls in Q2, so i need to create 4 macros in Generate macro which will be 1 year before that is 4 quarters.
That is Q1_19, Q4_18, Q3_18, Q2_18.
Hence the 4 macros will be having values as:
Macro 1: Q1_19
Macro 2: Q4_18
Macro 3: Q3_18
Macro 4: Q2_18
Similarly for another Quarter, i need to create 4 new quarters for the next year.
For eg: Date = 30/06/2019 falls in Q2
Hence i need to create 4 macros will values:
Macro 1: Q3_19
Macro 2: Q4_19
Macro 3: Q1_20
Macro 4: Q2_20
Do we have some operator where we can achieve this dynamically? Thank you.
I am trying to make a process very dynamic in terms of creating multiple series of quarters based on a quarter input
Example:
I have a date for eg: 01/04/2019.
The above date falls in Q2, so i need to create 4 macros in Generate macro which will be 1 year before that is 4 quarters.
That is Q1_19, Q4_18, Q3_18, Q2_18.
Hence the 4 macros will be having values as:
Macro 1: Q1_19
Macro 2: Q4_18
Macro 3: Q3_18
Macro 4: Q2_18
Similarly for another Quarter, i need to create 4 new quarters for the next year.
For eg: Date = 30/06/2019 falls in Q2
Hence i need to create 4 macros will values:
Macro 1: Q3_19
Macro 2: Q4_19
Macro 3: Q1_20
Macro 4: Q2_20
Do we have some operator where we can achieve this dynamically? Thank you.
Tagged:
0
Best Answer
-
MarcoBarradas Administrator, Employee-RapidMiner, RapidMiner Certified Analyst, Member Posts: 272 Unicorn@achint_kumar then you can create a column with adjust date in order to get a date 4 quarters before and another for a date 4 quarters ahead. Then extract the macro those dates and use it on a filter example and a loop1
Answers
you could also generate and attribute and through concatenation and date part extractions get to it.
For some reason Date to Nominal doesn't accept the q argument to extract the Quarter of a date.
@sgenzer could you help us with the Date to Nominal operator?
This is the example that could get you started
I may also have to chek 8 quaters or 12 quarters before/after the date. SO it has to be very dynamic.