5 Replies Latest reply on Apr 1, 2016 9:18 AM by Andrew Watson

# Display of rolling 24 months data

Hello SME's

I would like to display bar chart in the following format using a parameter in a single worksheet

Example:

If my Parameter [Auths Thru] date is 03/2016, I need in the following way

1. Rolling 12 months data (from 02/2016 to  03/2015)

I have achieved with the following calculation

IF DATETRUNC('month',[YYYYMM Date]) >= DATETRUNC('month',DATEADD('month',-12,[Auths Thru]))

THEN

[Students]

ELSE

NULL

END

I need help to display Rolling 24 months data (from 02/2015 to 03/2014)

??

Thanks

Bairam

• ###### 1. Re: Display of rolling 24 months data

This seems to simple based on the formula you've already been able to create, but doesn't changing the -12 in your dateadd to -24 do it?

Or do you actually want to see months -24 to -13? In which case this might do it:

IF DATETRUNC('month',[YYYYMM Date]) >= DATETRUNC('month',DATEADD('month',-24,[Auths Thru])) AND DATETRUNC('month',[YYYYMM Date]) < DATETRUNC('month',DATEADD('month',-12,[Auths Thru]))

THEN

[Students]

ELSE

NULL

END

2 of 2 people found this helpful
• ###### 2. Re: Display of rolling 24 months data

Hey Andrew Watson,

Thanks for your help, that was very immediate, in fact I have corrected my previous Rolling 12 month logic too as per your logic, I have tested it, works fine.

Bairam

1 of 1 people found this helpful
• ###### 3. Re: Display of rolling 24 months data

Thanks, can you mark the answer as correct to get this thread closed?

• ###### 4. Re: Display of rolling 24 months data

Hi Andrew,

I cannot see any actions to mark the answer as correct.. can you help me on that..

• ###### 5. Re: Display of rolling 24 months data

Actually I'm not sure - I don't often post questions on here :-) Maybe it's one of the Actions?