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

 

Adding two Rows Together for the same Line Item in the same Query

Started by HelloCognos, 09 Jul 2018 07:06:26 PM

Previous topic - Next topic

HelloCognos

Hello, :)

We have a List that showing the below listing.
CAR LISTING

CAR                Repair Cost                 Maintenance Cost
BMW                  2700                              9255
                         6555

BENZ                 3700                              11255
                         7555



So I need the Maintenance Cost to be the addition of the two Repair Cost in
this Report Analytics List.

Could some please let me know if I can do this by using some sort of Calculation,

Thanks a lot!

oscarca

try something like this:

[Maintance cost] = total([Repair Cost] for [Car])

Reinhard

Hi,

sure, you have a column with the [car name] and one with the [repair cost] in your list. You now add a query calculation with following text:

total([repair cost] for [car name])

Regards

HelloCognos

Thanks so much! that works.  :)

Now, I need to add up the rows and show the total on of the rows or a new row. So, 9255 is the addition
of Body and Tires repair cost.

something like below,

CAR             Type                      Repair Cost
BMW             Body                     2700
BMW             Tires                     6555
BMW             CAR Cost(Total)     9255           
             
So If I can create a new row using Calculation that shows the total of the Repair Cost (on a Row not column) that would
suffice my second need if you don't mind. This way I can hide the other rows or exclude them from the listing and only show
the total cost of 9255.

Thanks a lot again.

Reinhard

Just mark your column and go to the menu and click the summarize button and since you probably want sums for your car names group that column first.

HelloCognos

My apologies but not sure what you mean by the steps you describes. I just need to add the values of two rows under the BMW into an additional row (If possible). I think I'm understanding what you are saying. Let me try it again! Thanks so much!

oscarca

Select Car column and repair cost column in the list and group them. After that select repair cost column and summarize it.

HelloCognos