Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

for each question

Hi,

i have the following script...   The Codeblock are repaeted. How can I write the code to the For each loop shorter or more elegant ?

Thank you for advice.

Best Regards,

TEMP_PICKER_SITES:

    LOAD Distinct FilePath() AS FileName,

         FileTime() AS DateFile

    FROM D:\Qlikview11\Tools\APITool_v3_Qlikview\reports\28781_20*.csv;  //Systemanomalie ?!

    INNER JOIN (TEMP_PICKER_SITES) LOAD max(DateFile) as DateFile RESIDENT TEMP_PICKER_SITES;

    LET FileNameOfSites = peek('FileName',-1);

    DROP TABLE TEMP_PICKER_SITES;

   

TEMP_PICKER_CAMPAIGN:

    LOAD Distinct FilePath() AS FileName,

         FileTime() AS DateFile

    FROM D:\Qlikview11\Tools\APITool_v3_Qlikview\reports\28779_20*.csv;

    INNER JOIN (TEMP_PICKER_CAMPAIGN) LOAD max(DateFile) as DateFile RESIDENT TEMP_PICKER_CAMPAIGN;

    LET FileNameOfCampaign = peek('FileName',-1);

    DROP TABLE TEMP_PICKER_CAMPAIGN;

   

TEMP_PICKER_CAMPAIGNEXT:

    LOAD Distinct FilePath() AS FileName,

         FileTime() AS DateFile

    FROM D:\Qlikview11\Tools\APITool_v3_Qlikview\reports\111573_201*.csv;

    INNER JOIN (TEMP_PICKER_CAMPAIGNEXT) LOAD max(DateFile) as DateFile RESIDENT TEMP_PICKER_CAMPAIGNEXT;

    LET FileNameOfCampaignExt = peek('FileName',-1);

    DROP TABLE TEMP_PICKER_CAMPAIGNEXT;

0 Replies