Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sanjujeeboy
Creator
Creator

updating records

Hi All,

I have a table  named Old , which is loaded in qliksense. Now these values gets updated and my requirement is : the table should be updated with new values as in table new. How could i achieve this

 

New  
DateCampaignLeads
4/16/2020A50956
4/17/2020B7078
4/18/2020C51248
4/19/2020D7740
4/20/2020E2100
   
   
Old   
DateCampaignLeads
4/16/2020A50956
4/17/2020B6568
4/18/2020C49378
4/19/2020D7660
4/20/2020E1908
Labels (2)
1 Reply
ArnadoSandoval
Specialist II
Specialist II

Hi @sanjujeeboy 

It could be done with ApplyMap  as long as Date and Campaign uniquely define the record to update, by example the record for Campaign B on the 17.Apr.2020 is unique, the script code is shown below:

New_Data:
Mapping Load Date &'|'& Campaign, Leads Inline [
Date	Campaign	Leads
4/16/2020	A	50956
4/17/2020	B	7078
4/18/2020	C	51248
4/19/2020	D	7740
4/20/2020	E	2100
] (delimiter is '\t');

Old_Data:
Load Date,
     Campaign,
     ApplyMap('New_Data', Date &'|'& Campaign, Leads) As Leads
From [lib://Update_Records\Old_Data.qvd](qvd);

 Here is the screenshot

Update_Record.jpg

Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.