Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

problems with my load script

Hi Guys,

I'm having problems with my script. The frist problem is that when I loaded my data (in debug mode) in my qlikview application, I get certain fields that are empty even though they are not. I've loaded more than 5000 lines, but the fields remain empty. 

These Field remain empty:

INCOME,

Sales,

Client

KeyAccount

I don't know why, but I think it's related to the left join that I do and then load the data back using the RESIDENT function. Or there just something wrong with the way I load my script.

The second problem is that I can't do a reload. The moment I reload my data I get Execution of Script Failed.. It that because of my memory or CPU limitation/capacity?  I'm 100% postive that the QVD file is not in use.

I've attached my script.

Please Help!

iSam

15 Replies
Anonymous
Not applicable
Author

I wil upload the data in an hour. connection at work is very slow

Anonymous
Not applicable
Author

Hi Marc,

I've upload my file, without the resident load. As you can see the sales field is filled with data.

The moment I load from a resident, I get 0 in sales.

iSam

Not applicable
Author

What is the error you are getting? I exported the data above and reduced it to 80k rows and tried doing the resident and it gave me an expression error, I changed the Group by section of the resident load and it gives no errors. From what I can see you are grouping the same in the resident load as in the main load? I might have missed something but if this is the case, it does not really make sense to do aggr in the resident as it is giving the same results as the main.

Anonymous
Not applicable
Author

Hi marc,

If I do a group by in the resident load correctly I don’t get any error, the output of sales however remains zero.

The reason why I use group by twice is that I first aggregate the e.g. the maximum grossweight max(Shipments.GrossWeight) as MgrossWeight

Then I use the sum(MgrossWeight) in the resident table, since I’m using an aggregate function in the resident load I have to use the group by again.

I tried a different approach by using the Let statement, e.g.: Let vGrossWeight = max(Shipments.GrossWeight); and then call that variable in the resident load sum($(vGrossWeight)) as SumGrossWeight.

But that didn’t work also.

Please forgive me for my ignorance as I’m quit new to Qlikview and therefore I might do thinks which may seem inlogic.

Regards,

iSam

Not applicable
Author

Can you look at the sample I posted and change the group by in the resident load to what you want? I was able to do it and return results in all fields, however I am not sure if it is the correct group by as the original was causing an invalid expression error.  If you can change it to what you need and post the code for the resident according to this sample I can take another look at it.

Also, How many tables are joined to make the QVD? By looking at the sample I can not tell how the original data is put together and it appears to me that 2 tables with a one to many relationship were joined to cause duplicate data. This can cause issues with summaries as it will return incorrect results from duplicates.

I haven't used varibles in the script very much, but from what I understand they can only hold one value. With your group by is the original table, you are returning almost a million rows for shiments.grossweight so you can not set it to a variable based on your group by. I believe it would rewrite your vriable for every row it returns. (As I said I could be wrong, I do not use them often)

Anonymous
Not applicable
Author

I marc,

I will create a protype (qv file + qvd's) and upload it. Hopefully that would give you more insight.

regards,

iSam