Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to assign numbers to each quarter..Like for Q1, 1 to 100 and for 2nd quarter again it should start from 1 to 91...
same for Q3 and Q4.
Can someone suggest me.
Thanks in advance!
Muni.
Hi Muni,
Can you please provide the full requirement?
Why is Q1 starting from 1-100 but Q2 is 1-91?
What about Q3 and Q4? is it 1-100 or 1-91?
Try it with: daynumberofquarter().
- Marcus
HI Marcus,
Thank you for your suggestion.
I want to achieve the below .
date expected_value
2017-01-01 1 # because it it the first day in Q1
2017-01-02 2 # because it is the second day in Q1
2017-02-01 32 # because it is the 32th day in Q1
2017-04-01 1 # because it is the first day in Q2
Thanks,
Muni.
Did you try: daynumberofquarter(date) ?
- Marcus
Thanks Marcus,
It is working fine.
Hi Marcus,
How can i get same DayofQuarternumber of previous quarter.
Example: 2018Q3 ,9/5/2018, 67Day, value
2018Q2, 6/5/2018, 67Day, value (need to get this dynamically)
Please suggest me.
Thanks,
Muni.
I think it's not possible - then months have just a different number of days and therefore the quarter-number couldn't return the same calendar-day in another quarters. I think you need a different approach for it - maybe with addmonths() like:
addmonths(date, -3)
- Marcus
Hi Marcus,
I tried this "addmonths(date, -3)" but it will not give the same DaynumberofQuarter.
Muni.
My suggestion with addmonths() wasn't aimed to get the same quarter-number (like above mentioned I think it's not possible) else to return the same calendar-date (day-number) within the months.
I don't know what your aim is with the quarter-number but a comparing of any measure against them or a monthly calendar-day will always have some blurring. An alternatively (which also not mandatory give you the same calendar-day back) might be to count working-days within your periods (excluding weekends or any kind of holidays).
If everything of it is not really satisfying for you you could consider to use another calendar like 4-5-4 Master Calendar whereby I'm not sure that any of the alternative calendars might fit to your requirements and/or have other disadvantages.
- Marcus