Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have below script , Part (A) work fine. But Part (B) not working , because it only load 1 raw data file , it should load 2 raw data file.
SET vRAWPath = 'C:\Users\pauly\Dropbox\QV_RAW_ISDN\'; //local folder
// Part (A)
For Each i in 'PM','SD'
Data:
LOAD
'$(i)' as SOURCE,
[Sales Person] AS Sales_Person,
[Opportunity Name] AS Opportunity_Name,
[Company Name] AS Company_Name,
[Contact Person] AS Contact_Person,
[Opportunity Closing Date] AS Closing_Date,
[Opportunity Closing Date],
[Opportunity Starting Date] AS Starting_Date,
[Opportunity Amount] AS Opp_Amount,
[Stage of Opportunity] AS Stage,
[Probability %] AS Probability,
[Opportunity Number] AS Opp_number
FROM
$(vRAWPath)CRM_$(i).CSV
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
NEXT i;
//Part (B)
left join(Data)
load date(max([Opportunity Closing Date])) as [Opportunity Closing Date],
1 as Latest_Date_Flag
resident Data;
My question is how to apply FOR and i at above script ? So that it will load twice.
I have try below , it does not work :-
For Each i in 'PM','SD'
left join(Data)
'$(i)' as SOURCE,
load date(max([Opportunity Closing Date])) as [Opportunity Closing Date],
1 as Latest_Date_Flag
resident Data;
NEXT i;
Paul
Only thing of which I can think is the following:
https://community.qlik.com/t5/Qlik-Design-Blog/Preceding-Load/ba-p/1469534
Regards,
Brett