Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikmpate0
Creator II
Creator II

How can I summate sales where the requested date is less than or equal to today

Hi,

I'm trying to calculate the number of items sold where the requested date of the order is less than or equal to today.

I have use set analysis initially and used a flag to say of the order is in the current period mark it as 'Y' but its not working.

ie the leading months are not being included.

this is my set analysis expression:-

Sum({$<OELRDCurrentPeriodFlag = {'Y'},OE_Order_Lines_All.OPEN_FLAG={'Y'},OE_Order_Headers_All.INVOICE_TO_ORG_ID-={1020}>} OE_Order_Lines_All.ORDERED_QUANTITY)

Sorry if I haven't given all the information as I'm a bit new to all this...trying to get the hang of things.

2 Replies
Gysbert_Wassenaar

Generally something like this: sum({<RequestedDateField={'<=$(=today())'}>}amount).


talk is cheap, supply exceeds demand
qlikmpate0
Creator II
Creator II
Author

Can I add another value to this ie:-

=Round(InvoicedQTY)+Sum({$<vPEndDate={'<=$(today())'},OE_Order_Headers_All.INVOICE_TO_ORG_ID-={1020}>}OE_Order_Lines_All.ORDERED_QUANTITY)/1000