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: 
jessica_webb
Creator III
Creator III

Reloading data as cross table - script failure

Hi,

I'm getting the 'Execution of script failed' message (but no explanation why).

It's happened since I added in a section to reload the same datasource, but as a cross table.

Is anyone able to see where I'm going wrong? I don't think I have any loops in there...

TABLE_DATA:

LOAD

     '$(vProgress1)' as Progress_point,

     ID,

     ApplyMap('Long_map',Type) as Type_long,

     Set as Initial_Set,

     Current,

    Expected

    FROM

[..\Data received\$(vProgress1)\$(vFilename1).xlsx]

(ooxml, embedded labels, table is [Data template]);

temp1:

CrossTable(Cat, Outcome, 10)

LOAD

'$(vProgress1)' as Progress_point,

     ID,

     ApplyMap('Long_map',Type) as Type_long,

     Set as Initial_Set,

     Current,

     Expected

FROM

[..\Data received\$(vProgress1)\$(vFilename1).xlsx]

(ooxml, embedded labels, table is [Data template]);

LEFT JOIN (TABLE_DATA) LOAD *

Resident temp1;

Drop TABLE temp1;

LEFT JOIN (TABLE_DATA) LOAD *

Resident temp1;

Drop TABLE temp1;

LE temp1;LE

It it helps, what I wanted from the original 'TABLE_DATA' is to keep 'Current' and 'Expected' as they are. But then also add two new fields, one called 'Outcome' which would hold the values of Current and Expected, and and another called 'Cat' which would tell me whether the Outcome was from the Current or Expected field.

12 Replies
rupamjyotidas
Specialist
Specialist

Do this first : Save in QVD

temp1:

CrossTable(Cat, Outcome, 10)

LOAD '$(vProgress1)' as Progress_point,

      ID,     

      ApplyMap('Long_map',Type) as Type_long,     

      Set as Initial_Set,     

      Current,     

      Expected

FROM [..\Data received\$(vProgress1)\$(vFilename1).xlsx] (ooxml, embedded labels, table is [Data template]);

Then Second: Save in QVD

Then use those QVD with the Original Table

jessica_webb
Creator III
Creator III
Author

My apologies Jose! You were absolutely right, it was the '10' qualifier fields that was the issue. Strange, as in a previous crosstable I refer to the full number of fields in the original datasource and it works ok (even though I don't load all of them). But in this case, changing the qualifier to '4' has fixed it!

Thanks, and apologies again

jmvilaplanap
Specialist
Specialist

You're welcome Jessica

For the cross tables I always use the wizard because I never remember the parameters.

Regards.