Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
WE ARE LISTENING! New Navigation for Qlik Community, Sept. 26: TELL ME MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kiru_18
Contributor II
Contributor II

Sum the values based on conditions

Hi,

I need to sum 2 values based on some condition. I have entrydate, invoicedate, entryquantity, invoicequantity fields.

Requirement: If entrydate is selected it should sum entryquantiy and result is sum of entryquantity, if invoicedate is selected then it should Sum the invoicequantity and result is sum of invoicequantity.

This expression i need to build in one column in pivot table. 

Labels (2)
1 Reply
Or
Champion
Champion

Sum(If(GetSelectedCount(entrydate)>0,entryquantiy, if(GetSelectedCount(invoicedate)>0,invoicequantity)))