Tip/Trick to copy data in Period Dimension

Tip/Trick to copy data in Period Dimension

Joined: April 15th, 2013, 1:28 am

January 12th, 2017, 5:04 pm #1

Need to populate values in Day2 through Day 365 (those are level 0) of each Month, based on the value in Day1.
Also need to only populate value with a value of 1 through 7.

If Day1 is 7, then Day2 is 1, Day 3 is 2 etc through Day7 which will get a value of 7,
then Day 9 will start with a value 1.

Need to build this dynamically.

Any help or ideas?
Quote
Like
Share

Anonymous
Anonymous

January 12th, 2017, 9:04 pm #2

If you want to calculate and store result you can do something like this:

FIX(Day02:Day365)
WeekDay(
IF(@COUNT(Periods,@CURRMBRRANGE(Periods,LEV,0,,0))-@COUNT(Periods,@CURRMBRRANGE(Periods,LEV,0,,-1)) < 7)
IF(@PRIOR(WeekDay)+1 >7)
WeekDay=1;
ELSE
WeekDay=(@PRIOR(WeekDay)+1;
ENDIF;
ENDIF;
)
ENDFIX;

In order to do that as dynamic calc member then you need to create WeekDay_inout member to store value for Day01 and create dynamic calc member WeekDay with this formula:

IF(@ISMBR(Day01))
WeekDay=WeekDay_input
ELSE
IF(@COUNT(Periods,@CURRMBRRANGE(Periods,LEV,0,,0))-@COUNT(Periods,@CURRMBRRANGE(Periods,LEV,0,,-1)) < 7)
IF(@PRIOR(WeekDay)+1 >7)
WeekDay=1;
ELSE
WeekDay=(@PRIOR(WeekDay)+1;
ENDIF;
ENDIF;
ENDIF;

Regards,
Yuri
Quote
Share


Confirmation of reply: