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

Add missing records

Hi all,

i have aproble, which i thought was solved, but the solution created over 200000000 records in a table and my qv app was running out of memory.

Here is what i have and need to accomplish: I have one table:

YearMonth
ID
Amount
201201114
201202112
201201211
201202213
20120329
201201312

The table above lists for each month and ID in the current year an amount - IF there is one. If there is none, there is just no record.

What i need: I want for each ID where there is no amount and hence there is no record for this month a dummy record with amount = 0. For the table above this means:

YearMonth
ID
Amount
201201114
201202112

201203

10
201201211
201202213
20120329
201201312
20120230
20120330

I want to do all this in the LOAD script.

Thanks a lot!

5 Replies
SunilChauhan
Champion II
Champion II

properties -> presentation-> uncheck Supress zero values

hope this helps

Sunil Chauhan
Not applicable
Author

I need to do this in the LOAD script...

Thanks.

SunilChauhan
Champion II
Champion II

in script

try one of below

if(amount=' ',0,Amount) as amount

or

if(len(amount)=0,0,Amount) as amount

or

if(isnull(amount)=-1,0,Amount) as amount

hope this helps

Sunil Chauhan
Not applicable
Author

Sorry, this does not do anything as there is just no record to check on.

I think the check must be done on a missing YearMonth for a given ID, but i am just not sure how to do this.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Could you tell me why you need to add the missing records?

Celambarasan