COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: shital kumar on 19 Dec 2016 01:14:41 AM

Title: subtraction of two rows value
Post by: shital kumar on 19 Dec 2016 01:14:41 AM
I have a crosstab as below and I am using relational datasource

                                                                                    Period1       Period2      Period3
Source         Destination        Priority     Measures
Source1            Destination1          1               QTY             100                200           300
                                                                   Cost             200                400           600
                       Destination2          2               QTY             400                500           600
                                                                   Cost             800               1000         1200
                       Destination3          3               QTY             700                 800          900
                                                                   Cost            1400               1600         1800


I just want to subtract the Cost of priority 1 from Cost of Priority 2 and priority 3. So the result would be something like below.

                                                                                    Period1       Period2      Period3
Source         Destination        Priority     Measures
Source1            Destination1          1               QTY             100                200           300
                                                                   Cost             200                400           600
                                                                   difference     600                600           600
                       Destination2          2               QTY             400                500           600
                                                                   Cost             800               1000         1200
                                                                   difference     1200              1200         1200
                       Destination3          3               QTY             700                 800          900
                                                                   Cost            1400               1600         1800


Thanks,
Shital