COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: motorbass on 29 Aug 2013 08:37:13 AM

Title: Running Difference on Grouped Rows
Post by: motorbass on 29 Aug 2013 08:37:13 AM
Hi I want to use the running difference function on grouped rows(See Figure 1), but I get that running difference applies to every value(see Figure 2).  Hopefully that makes sense and  somebody help me out.

Figure 1

Product Type             Sales         RD
A                                  100             
                                    200        100
                                    150         -50
B                                  175             
                                    225          50
                                    250          25
C                                    10             
                                      20          10
                                      40          20 


Figure 2
Product Type             Sales         RD
A                                  100             
                                    200        100
                                    150         -50
B                                  175          25 
                                    225          50
                                    250          25
C                                    10       -240   
                                      20          10
                                      40          20 

Thank you,

Motorbass
Title: Re: Running Difference on Grouped Rows
Post by: Lynn on 29 Aug 2013 10:32:09 AM
Try using the "for" clause to define the scope as product type.
Title: Re: Running Difference on Grouped Rows
Post by: motorbass on 29 Aug 2013 11:11:49 AM
Thanks so much Lynn, it worked perfectly.



Motorbass