Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
AnkitMadhukar
Creator
Creator

Qlik Sense | Set Analysis Help for summing across dimensions from different table

Hi Everyone , 

Can I get your help with this use case 

There are two tables associated  on LOCID.

Table A

LOCIDAmountDate
1201/1/2020
2301/2/2020
3101/3/2020
4201/4/2020

 

Table B 

 

LOCIDNAME
2A
3B

 

 

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

2 Replies
PriyankaShivhare
Creator II
Creator II

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

 

agigliotti
Partner - Champion
Partner - Champion

Hi @AnkitMadhukar ,

maybe this:

sum( {< NAME = {"*"} >} Amount )

I hope it can help.

Best Regards
Andrea