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.

Not applicable

How to use dynamic date to analyse sales vs latest stock

Hello,

I'm new to Qlikview and I try to create my own analyses for my Retail business (sales, stock, orders, delivery)

I would like to create a view per product where I can see the following:

SKUSales QtyQty On HandQty OrderedQty Delivered
SKU 11045014

SKU 2

1566021
etc.

I would like to use a filter on the Sales date, so I can get the sum or average Qty Sold on the period I select. However, when I do this, my Qty On Hand, ordered and delivered are all 0 (there is no date in stock table as it's always the current stock).

How should I import and link my facts table (sales, stock, order, delivery) and dimensions tables (Store info, Item info) ?

Thank you

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Not applicable

Re: How to use dynamic date to analyse sales vs latest stock

Perhaps a set analysis expression will work. If your have a field named SalesDate and an expression sum(QtyOnHand) for the Qty On Hand amount then you could change it to sum({<SalesDate=>}QtyOnHand) to ignore selections in the SalesDate field.


talk is cheap, supply exceeds demand
4 Replies
Gysbert_Wassenaar
Not applicable

Re: How to use dynamic date to analyse sales vs latest stock

Perhaps a set analysis expression will work. If your have a field named SalesDate and an expression sum(QtyOnHand) for the Qty On Hand amount then you could change it to sum({<SalesDate=>}QtyOnHand) to ignore selections in the SalesDate field.


talk is cheap, supply exceeds demand
Not applicable

Re: How to use dynamic date to analyse sales vs latest stock

Yes, it works fine now, just need to be careful to "disable" all necessary dimensions

Thank you

Not applicable

Re: How to use dynamic date to analyse sales vs latest stock

What should be the correct syntax if I don't want to apply the selection based on the value of this selection:

sum({<SalesDate=2012>}QtyOnHand) seems not to work (nothing is displayed in the chart)

Thank you

Gysbert_Wassenaar
Not applicable

Re: How to use dynamic date to analyse sales vs latest stock

If you want to fix the selection for SalesDate to the value 2012 use this: sum({<SalesDate={2012}>}QtyOnHand)


talk is cheap, supply exceeds demand