6 Replies Latest reply on Nov 28, 2016 11:29 PM by sudhakar reddy

# Creating formula to view the last 12 months - but to omit all but Dec'15 of the previous year

I am trying to put together a formula to display the last 12 months, however, it is showing data for 2015, which I do not want to see. The only data from 2015 that I want to see is Dec 2015.

How can I write a formula to say "only show 2015 data if it is Dec'15"?!

• ###### 1. Re: Creating formula to view the last 12 months - but to omit all but Dec'15 of the previous year

Hi Nicola,

Find my approach as reference below and stored in attached workbook version 9.3

Below you will find the steps

a. Current Year: DATEPART('year',today())

b. LY: [Current year]-1

c. LM LY: date("1-12-"+str([LY]))

d. CY + LM LY: [Date]>=[LM LY ] and [Date]<=today()

• ###### 2. Re: Creating formula to view the last 12 months - but to omit all but Dec'15 of the previous year

Hi Norbert,

Thanks a lot for your help - works perfectly!

Nicola

• ###### 3. Re: Creating formula to view the last 12 months - but to omit all but Dec'15 of the previous year

Goodmorning Nicola,

Great I could help out. Your "awards" are much appreciated:)

Have a nice one

• ###### 4. Re: Creating formula to view the last 12 months - but to omit all but Dec'15 of the previous year

Nicola Prime,

This is just to suggest you that you can also achieve the desired result with minimal effort and without any calculations.

Please find the below attached workbook.

Let me know if it helps.

Regards,

Sudhakar Reddy

• ###### 5. Re: Creating formula to view the last 12 months - but to omit all but Dec'15 of the previous year

Hi Sudhakar,

Many Thanks for your response on this. May I ask, how do you create a set?

Thanks

Nicola

• ###### 6. Re: Creating formula to view the last 12 months - but to omit all but Dec'15 of the previous year

Hello Nicola,

You just need to click on the items that you want to make as a set and hover to see the 2 combined circle symbol.Click on it to create a set.