Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

qlikmpate0
Contributor 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
MVP & Luminary
MVP & Luminary

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

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


talk is cheap, supply exceeds demand
qlikmpate0
Contributor II

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

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