Cummulative Measure
Calculating a cummulative measure is common query in DW, but there is no straight forward way in DI. Either you have to write a custom function or you have to design using query transform.
I have a source data like this,

I want target data like this,
Well will see the design, here i have two QRY instances and generating a row number in each instance
will do a self join on the basis of RNUMĀ and then summing up the credit value
and grouping the values based on Year & Month in the same QRY instance
and then apply order by on the basis of Year and Credit in another QRY instance
Execute the job, you’ll get the desired output.






Hi
Just use the previous_row_value() function. With this its very easy to calculate a cumulative sum.
Cheers, Roger
Thanks Roger for your suggestion. Yes I could use that, but previous_row_value() function is there from 11.7 on wards. What if i’m using prior versions of DI like 11.5/6.x ? That’s why I’ve implemented in this way.
Thanks,
-Sudheer