3 Replies Latest reply on May 11, 2018 4:35 AM by Jim Dehner

# Convert Period Number to Month

Hi, please can anyone advise on the following in a simple way:

I have a Dimension called 'Period1' this relates to the periods in our fiscal calendar.....1=Current month, 2 = Prior Month, 3 = Prior Prior month, 4 = Prior prior prior Month etc.

Is there was of setting up a calculated field that basically concerts the Period number to a month/year and is dynamic, i.e.:

When Period 1 = May'18, Period 2 = Apr'18, Period 3 Mar'18

Then next month when I refresh the report, Period 1 = Jun'18, Period 2 = May'18, Period 3 = Apr'18

I was thinking some sort of calculated IFF function with EDATE, but can't get it to work.

Thanks!

Cameron

• ###### 1. Re: Convert Period Number to Month

Good morning

Assuming that period is an integer   you could use    ( dateadd('month',-([Period]-1), today()))

then set the date format as shown

if your period is a string Period 1 then convert the string to an integer   int(right([Period],2))   and use teh above formula

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

1 of 1 people found this helpful
• ###### 2. Re: Convert Period Number to Month

That worked brilliantly. Thank you for your help.