Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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
You're welcome Jessica
For the cross tables I always use the wizard because I never remember the parameters.
Regards.