Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Multiple IF conditions then Sum Quantity

I might be confused in QlikSense expression.

I am calculating sum(Quantity) according to whichever date is detected first but there will always have value in Req Ship Date. After getting each type of date total, I will display by YearMonth. Let's say Req Shipment = 60pcs in the month of April, ETD Port = 20pcs in the month of April, DO = 0pcs in April, so total for April is 80pcs.

Example

if DO Completion Date NOT NULL

     vDO+=quantity

elseif DO Completion Date is Null

     if ETD POL Date NOT NULL

          vETD+=quantity

     elseif ETD POL Date is Null

          vReq+=quantity

-------------------------------------------------

Total April is vDO+vETD+vReq

How do I produce this in chart fx ?

if([DO Completion Date] <> '',vDO = vDO + [Quantity (PCS)], if([DO Completion Date] = '', if([ETD Port Of Loading Date] <> '', vETD = vETD + [Quantity (PCS)], if([ETD Port Of Loading Date] = '', vREQ = vREQ + [Quantity (PCS)])), vDO+vETD+vREQ))

0 Replies