Page 1 of 1

Convert Snapshot Closing Blances to Balance Change

Posted: Mon Sep 20, 2010 4:51 pm
by CiskoWalt
Hello,

Every Monday, a file is extracted from a source system. The file contains an inception-to-date (from 1996) count of product purchases

File of : Monday 2/2/2010

Date Product Count
2/2/2010 prod1 10
2/2/2010 prod1 15
2/2/2010 prod1 18
2/2/2010 prod1 21

File of : Monday 2/8/2010

2/8/2010 prod1 15
2/8/2010 prod1 20
2/8/2010 prod1 23
2/8/2010 prod1 26

Inception to date values are pulled because adjustments are made to prior weeks in the souce system.

Is it possible to create a Ti process that poplulates two measures: One with the inception-to-date value on the file and a second with the change in count from the previous load.

The n level elements in the Time dimesnion look like this: 201009W1

Thanks,

Walt

Re: Convert Snapshot Closing Blances to Balance Change

Posted: Tue Sep 21, 2010 12:35 am
by Andy Key
If you definitely want to do this within TI (rather than using a hierarchy or rules), then use an attribute that points to the previous week and a CellGetN to read last weeks number then use a CellPutN to write the difference between the CellGetN and the current value to your second measure.