I'm trying to calculate the total Purchase Order quantity for the last Purchase Order delivered. I used below expression to give me my results which does return values. However, I need to add a sum function inside of this expression in order to get the total quantity as each purchase order can have multiple lines for the same material. Also, I am receiving null values in my results which could be due to multiple last delivery dates for a material.
The dimensions for my chart are Material,Vendor,Plant
Here is a sample of my results; I missing a purchase order quantity for delivery date 02/20/2017. It's supposed to be 41. I looked at the data inside my application and saw that there were multiple Purchase orders with delivery dates of 02/20/2017 which could be confusing Qlikview into deciding which Purchase order to use. Please advise if there are any solutions to this?