Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have table like below...
| REGION | CUSTOMER | CREDIT | SALES |
| A | A02 | 2700 | 100 |
| A | A02 | 2700 | 200 |
| A | A03 | 3000 | 200 |
| A | A06 | 2700 | 400 |
| A | A08 | 3000 | 600 |
| A | A08 | 3000 | 800 |
| A | A08 | 3000 | 300 |
| SH | SH03 | 1500 | 200 |
| SH | SH08 | 4000 | 600 |
| SH | SH10 | 4000 | 800 |
| SH | SH10 | 4000 | 1100 |
| SH | SH20 | 1500 | 1200 |
| SH | SH20 | 1500 | 1400 |
| SH | SH25 | 3500 | 1600 |
Need output table as below
| REGION | CREDIT | SALES |
| A | 11400 | 2600 |
| SH | 14500 | 6900 |
This solution should be on UI side only... I don't want to handle this on script end...
Use Distinct with sum
Dimension:- REGION
Expr1:- Sum(SALES)
Expr2:- Sum( Aggr( sum(DISTINCT CREDIT),CUSTOMER) )