4 Replies Latest reply: Sep 15, 2014 3:45 AM by Mayil Vahanan Ramasamy

# How to merge similar rows

Hi Friends,

I have data like this

Inline

[

A, B, C, Code, Amount

1, 2, 3, PC, 900

1,2,3,PC,900

1, 3, 4, PM,  800

1, 2, 4, TM, 800

1, 2, 6, PC, 800

]

I have to merge first two rows and amount should be 1800.

Thanks

• ###### Re: How to merge similar rows

Create a straight table chart.

Add fields A, B, C and Code as dimension

Create a formula sum(Amount)

This will show you the wanted value.

Regards

• ###### Re: How to merge similar rows

In the front -end if you use aggregation function Sum() with other dimensions in a chart you get it as you want. If you are looking for script solution try like:

Input:

Inline

[

A, B, C, Code, Amount

1, 2, 3, PC, 900

1,2,3,PC,900

1, 3, 4, PM,  800

1, 2, 4, TM, 800

1, 2, 6, PC, 800

];

NoConcatenate

Final:

A,

B,

C,

Code

Sum(Amount) as Amount

Resident Input Group By A, B, C, Code;

Drop Table Input;

• ###### Re: How to merge similar rows

Hi,

Create New Chart --> Straight Table

Dimension

A

B

C

Code

Expression

=sum(Amount)

Regards

ASHFAQ

• ###### Re: How to merge similar rows

Hi

Try like this

Load A,B,C, Sum(Amount) as Amount, Code Group by A,B,C, Code;