Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi
Try like this
Load A,B,C, Sum(Amount) as Amount, Code Group by A,B,C, Code;
Load * 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
];
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
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:
Load
A,
B,
C,
Code
Sum(Amount) as Amount
Resident Input Group By A, B, C, Code;
Drop Table Input;
Hi,
Create New Chart --> Straight Table
Dimension
A
B
C
Code
Expression
=sum(Amount)
Regards
ASHFAQ
Hi
Try like this
Load A,B,C, Sum(Amount) as Amount, Code Group by A,B,C, Code;
Load * 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
];