Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Beuko
Contributor
Contributor

Cumm stock value by filtering in date

 

My data only has stock mutations per date, I would like to add a dimension of the cumulative stock value in the table & in my graph per stock item.

image00123.jpg

For example the actual stock value is 423, but when I select november 2019 the stock value is 0 because there was no mutation in november 2019.

 

Is there an expression i can use?

1 Reply
lfetensini
Partner - Creator II
Partner - Creator II

You need to consider that if the stock walks the timeline it will be natural for it to appear zero in a filter that is not available.

The best practice is to resolve this in the script with a flag (bedrag_current = 1) pointing out that this is the most current stock and then fetch it with Set Analysis, regardless of the selected period or bring last month's stock to the current one until there is a new mutation, based on inventory concept per month.

 

Set Analysis with flag in case:

Sum(
{<
 MonthYear =,
 bedrag_current = {1}
>}
bedrag
)

Support your colleagues. Remember to "like" the answers that are helpful to you and flag as "solved" the one that helped you solve. Cheers.