If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

rolling 12 months data

Started by tgs728, 02 Apr 2014 01:06:51 AM

Previous topic - Next topic

tgs728

HI All,

I have a requirement like this

year month qty
2013

tgs728

Sorry for in complete post

Year    MOnth       qty
2013     01             25
2013     02             20
2013     03             10
2013     04             25
2013     05             30

My desired data should be as qty should be sum for previous 3 months data.


Year   Month       qty
2013   05           65(30+25+10)
2013   04            55(25+10+20) and so on


Please can any body suggest me on this..
Thanks TGS

navissar

If this is relational, use moving-total, something along these lines:
moving-total ([Quantity],3)
If this is dimensional, use something along these lines:
total([measure] within set (lastPeriods (3,currentMember ([cube].[time dim].[time hioerarchy]))))