cancel
Showing results for 
Search instead for 
Did you mean: 

How to add two row values if conditions meet?

GSG
Participant
0 Kudos

Hello All,

I want to add up two rows values into one if existed values in the specific column are same. Here is an example:

In the provided example, run 605 has two records, one with 605 and the other with 605BD, but the operator name is same. I want to display it in one row so the new row shows the aggregated values like operating hours equal to 4.83 (2.83+2.00) and service hours is equal to 5 (3+2). Please advise. I will appreciate your help.

Accepted Solutions (1)

Accepted Solutions (1)

vitaly_izmaylov
Employee
Employee
0 Kudos

You can:

1. Group by the name field

2. Suppress the Details section

3. Add Group Summary to the Group Footer section

GSG
Participant
0 Kudos

Hello Vitaly,

I tried the same but it does not work but no luck. Here are the screenshots

vitaly_izmaylov
Employee
Employee

It looks like you groupped by ID field (in your example "117" and "117BD")

, but I suggested to Group by Name field (in your example "James Mac")

GSG
Participant
0 Kudos

Hello Vitaly,

I grouped by the name but no luck. Is there any way I will share crystal report with you? Thanks

Gurpreet

vitaly_izmaylov
Employee
Employee
0 Kudos

You can upload your report with saved data to

https://mdocs.sap.com/mcm/public/v1/open?shr=1pFBzPHYk0TnbrwYRqOuHiVuSTOJUoHMIHnB0h4iVg0

Note: the link has two weeks expiration time

GSG
Participant
0 Kudos

Hello Vitaly,

I just uploaded the file. I just want to aggregate when the BD happens with EventStringName. Thanks

Answers (2)

Answers (2)

vitaly_izmaylov
Employee
Employee
0 Kudos

Yes, you need to suppress the Group Header 3, add summaries to Group Footer 2, move the Group 3 name to Group Footer 2, then suppress Group Footer 2. And you will get only one line per name.

GSG
Participant
0 Kudos

I am trying. It seems that I am missing a step. Please perform this task for me. Thank you Vitaly.

vitaly_izmaylov
Employee
Employee

Uploaded new version, but created only one summary. The rest should be done the same way

vitaly_izmaylov
Employee
Employee
0 Kudos

I see the problem: your report is already Groupped by the ID and you need to add the Name Group to higher level, in your case to Group 2.

But in this case the Sorting will be changed. See the modified report I uploaded. Not sure if the new sorting could be acceptable solution.

GSG
Participant
0 Kudos

Hello Vitaly,

Thank you for your time. I really appreciate your help. I am ok with the sorting order but I want to have only one line. For an example; Operator Michael Kelete has two lines. Can we have only one row in such cases?