I have a cube with 4 Dimensions:
- Year
- MonthDay
- People
- Measure
The structure of Year is:
Code: Select all
Alle Jahre
2011
2012
2013
2014
2015
.
.
.
Code: Select all
Alle Monate
01
0101
0102
0103
0104
0105
0106
.
.
. (until 1231)
Now I want to calculate one Measure of one day from another Measuere the day before. I tried the following rule:
Code: Select all
# To leave the first day untouched
['2011','0101','Bestand'] = N: STET;
# Calculation "Bestand from Today = Kasse from Yesterday"
['Bestand'] = N: DB('Cube',
SUBST(DATE(DAYNO(!Year|'-'|SUBST(!MonthDay,1,2)|'-'|SUBST(!MonthDay,3,2))-1,1),1,4),
SUBST(DATE(DAYNO(!Year|'-'|SUBST(!MonthDay,1,2)|'-'|SUBST(!MonthDay,3,2))-1,1),6,2)|SUBST(DATE(DAYNO(!Year|'-'|SUBST(!MonthDay,1,2)|'-'|SUBST(!MonthDay,3,2))-1,1),9,2),
!People,
'Kasse');
If I start the Server and start Cubeviewer with this year I see "#N/A" and the "Circular reference" Error Message for the Measure "Betrag". But when I Change the year to 2011 it's working. and when I step in cubeviewer from year to year until today I see the correct value for today. Also when I Change a value in the back years I get the Error for today until I step through the cubeviewer year by year
Is my Approach possible and how can I get the correct values at once?
Thx and regards,
Willi
P.S: It's TM1 Version 10.2.2 FP1