Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trying to load missing data

Hi,

I am new to QlikView and I'm trying to create a QlikView document to store and manage data. I have several reports produced by the same program, but out of a list of about 30 fields the various reports may contain any 20 of these.

The code I am using is:

PolicyData:
LOAD '$(varRunDate)' as RunDate,
  '$(varCompany)' as Company,
  '$(varProduct)' as Product,
  CALENDAR_YR,
  GROSS_PROFIT,
  NET_PROFIT
  FROM
$(varFilePath).prn
;

Store PolicyData into ;

PolicyData:
LOAD * FROM

(qvd);

So I load in the new report, save it in a data folder, then load in all saved reports. As I load in all saved reports after every update I want all the data to be saved with identical columns, but some reports will contain GROSS_PROFIT and not NET_PROFIT, and vice versa. In reality there are more like 30 fields of which the report may contain any 20.

When I first load in the report is there any way to give a field a default value of 0 if it is not present in the report?

Thanks in advance for any help.

2 Replies
Not applicable
Author

bump

Anonymous
Not applicable
Author

first try loading all the field names seperately... and then check if the field is nul.. and if its null.. or its not there.. then assign anything in place of that field... like using a for loop...

hope this helps..