Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone ,
Can I get your help with this use case
There are two tables associated on LOCID.
Table A
| LOCID | Amount | Date |
| 1 | 20 | 1/1/2020 |
| 2 | 30 | 1/2/2020 |
| 3 | 10 | 1/3/2020 |
| 4 | 20 | 1/4/2020 |
Table B
| LOCID | NAME |
| 2 | A |
| 3 | B |
I want to write a set analysis that gives me sum(amount) for only those LOCIDs that are present in Table B.
So in this case the sum should be 40 (for LOCID 2 and 3)
I did try the P() function but to no avail.
Thank you
Ankit
In the load Script:
Map_TableBLOCID:
Mapping load LOCID,
1
Resident Table B
Table A:
LOCID,
Amount,
Date,
Applymap('Map_TableBLOCID',LOCID,0) as LOCID_FLAG;
Load * Inline[
LOCID,Amount,Date
1,20,1/1/2020
2,30,1/2/2020
3,10,1/3/2020
4,20,1/4/2020
];
In the FrontEnd:
Expression:
sum({<LOCID_FLAG={1}>}Amount)
Thanks,
Priyanka