Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have been given a task to get a value from multiple QVD files and compare it to one global variable.
I have written one section for each QVD file and getting the date and comparing with the global variable.
Sample code for each section is:
sub Account(dummy)
if FileSize('$(vQVDSourceFileName)$(vSource).qvd') > 0 then
TempTable:
LOAD *
FROM [$(vQVDSourceFileName)$(vSource).qvd](qvd);
AutoNumberQVDDate:
LOAD DISTINCT QVDDATE
Resident TempTable;
AutoNumber1:
LOAD max(QVDDATE) AS Key
Resident AutoNumberQVDDATE;
let maxDate = PEEK('Key',0,'AutoNumber1');
let Days = DATE(vWarehouseDate) - DATE(maxDate);
Switch Days
Case 0
let color = 'Blue';
Case 1
let color = 'Yellow';
Default
let color = 'Red';
end Switch
end if
end sub
I have written a seperate section to call each of the above sections - one for each file. When I click on Load Data, it compiles successfully. How do I plot the Colors for each file on a graph?
Thank you.
To answer my own question, I loaded the color and filenames onto a table, kept appending it till I ran out of files, pushed the final table onto a qvd file and used that to plot my graph.