I am trying to using BPC Script logic to update my Sales cube, specifically Revenue=Units*Price and Price=Revenue/Units using the "Price" stored in a seperate Price cube.
Inside default.lgl, I am *INCLUDE-ing my own script:
*LOOKUP PRICES
*DIM PREIS:ACCOUNT="Price"
*ENDLOOKUP
*WHEN ACCOUNT
*IS "Units"
*REC(FACTOR=LOOKUP(PREIS),ACCOUNT="Revenue")
*IS "Revenue"
*REC(EXPRESSION=%VALUE%/LOOKUP(PREIS),ACCOUNT="Units")
*ENDWHEN
*COMMIT
Now, when I insert new "Units" values using the std. Excel template, strange things happen:
- The Revenues seems to be computed and updated correctly in the cube (if I check them using excel templates, they show up).
- The Units seem to have the values they had before... seems they get old values ?!
E.g. if I have several write operations say, I write units=2,3,4 and price is constant 10,
the values in the cube seem to be (table):
value written, units in cube, revenue
3 , 2 , 30
4, 3 , 40
The new value is somewhere in the MS Analysis cube, otherwise, how could later be the new value be shown, although the excel templates seem to show old values?
Any explanation for that strange behaviour?