Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Help with Expression

Hi,

In my App (Wastage), i am loading in a table (StoreProductStock) with a field 'StockLevel' on it. This table is loaded in daily into qlikview.
How the table is populated....

Anytime there is a stock movement (Sales, Wastage, Stock Variance etc), at the end of the day a line is added to the table which states everything about the product (EAN, description, Sales Value, Cost Price, RSP, Stock Level, etc). so for example...
Coca Cola was sold at 12:04 reducing the stock level to '21'
Another is sold at 14:54 Reducing the stock level to '20'
A case of Coca Cola was recieved on a delivery increasing the stock to '44'.
The 'StoreProductStock' table is created at the end of the day with a line on stating that coca cola has a stock level of 44, then the table is sent to headoffice.
on the next day various stock movements happen again on coca cola ,the same happens at the end of the night, giving a line on the table: Coca cola stock level of '26'.
This happens for the full week.
Now if we are looking at Qlikview for the full week at Coca Cola for this particular store, the stock level will be sumed up for the week giving an inaccurate figure.
What i want to try and do if possible, is to write an expression which will only display the last 'Stock Level' figure recieved unless an individual day is selected where then it will show the stock level at the end of that particular day.
Can anyone tell me if this is possible?

Thanks

2 Replies
Not applicable

hi hopkinsc,

I think the better way is build an aggregated table in load time, don't you?

Regards.

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi Miguel, thanks for your reply.

I'm not sure how easy or difficult this is as i have never done it before....

Have you got time to help?