Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kash04kk
Contributor II
Contributor II

Calendar Year

Hi All,

I'm making the year as follows:

set vNoYears = ($(vE) - $(vS))/(365/1) + 1;

Valuation_Year:

Load

  addmonths($(vS),(iterno()-1)*12) as Valuation_Year

autogenerate 1  while iterno()<= $(vNoYears);

Here vS is '31-Dec-2011' and vE is '30-Sep-2017'. These are already loaded on the previous sheets. This formula works but shows values like this:

Valuation_Year

31-Dec-2011

31-Dec-2012

31-Dec-2013

31-Dec-2014

31-Dec-2015

31-Dec-2016


I want it to show 30-Sep-2017 also. Any suggestions, please??

1 Solution

Accepted Solutions
sunny_talwar

May be try this

SET vNoYears = ($(vE) - $(vS))/(365/1) + 1;

Valuation_Year:

Load RangeMin(Addmonths($(vS),(iterno()-1)*12), $(vE)) as Valuation_Year

AutoGenerate 1

While IterNo() <= $(vNoYears) + 1;

View solution in original post

4 Replies
its_anandrjs

Your date format is correct can you check this.

sunny_talwar

May be try this

SET vNoYears = ($(vE) - $(vS))/(365/1) + 1;

Valuation_Year:

Load RangeMin(Addmonths($(vS),(iterno()-1)*12), $(vE)) as Valuation_Year

AutoGenerate 1

While IterNo() <= $(vNoYears) + 1;

its_anandrjs

What is your correct values?

kash04kk
Contributor II
Contributor II
Author

Hey Sunny. This worked. Thanks a lot!