Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filling missing values with previous data (File attached)

Hello,

This is what I want to do:

I want to show the total stock in the past months. The stock is calculated using the current stock level with transaction history.

Problem is, when a month has no transactions, the stock level is 0. When calculating the total stock in that month, the total will be inaccurate.

Can someone please look at my Qlikview file? I have been struggling with this for the past 2 days.

Thanks in advance.

10 Replies
Not applicable
Author

I have like this:

=if(sum(aggr( FirstSortedValue( PartStockEnd, -Date) , Month, KeyPart))='0',Above(sum(aggr( FirstSortedValue( PartStockEnd, -Date) , Month, KeyPart))),sum(aggr( FirstSortedValue( PartStockEnd, -Date) , Month, KeyPart)))

But it shows just the same values.

and i think i know what the problem is: the transaction doesnt have records. so its not even 0, there is no record.