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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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
MVP
MVP

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