Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
John-SSI
Contributor III
Contributor III

View Old Data

Hi Forum,

I got a table let's say Data
Data:
Load
ID as Ticket
Subject,
Date,
Status,
If(IsNull(Service_Lookup__c),'Not Set',SubField(SubField(SubField(Service_Lookup__c,' '),';'),'_')) as ACRON,


The field Acron is data from Database and missing some old data.
So i want to fill them with the data i got from Excel.
In the Excel i simple got Ticket and OldAcron, i have tried mappingload but i don't get it work.
Any suggestions here?

Br

I got the Old data in a Excel and want to fill the emmty ones from Excel

Labels (2)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

If(IsNull(Service_Lookup__c), ApplyMap('MapExcel', CaseNumber), Service_Lookup__c) as ACRON

@John-SSI Read on ApplyMap - script function

View solution in original post

7 Replies
igoralcantara
Partner - Specialist
Partner - Specialist

Have you try ApplyMap? Here is the help file about it. See if this helps you.

 

ApplyMap - script function | Qlik Cloud Help

Check out my latest posts at datavoyagers.net
BrunPierre
Partner - Master
Partner - Master

Hi, I'd like to clarify what you mean by "missing some old data." Are you referring to null values, empty spaces, or possibly missing characters? It would be helpful if you could provide a sample of the values in the database field and the corresponding Excel sheet.

John-SSI
Contributor III
Contributor III
Author

Hi,

The missing data in DB is Null
Therefore this:
If(IsNull(Service_Lookup__c),'Not Set',SubField(SubField(SubField(Service_Lookup__c,' '),';'),'_')) as ACRON,

 

JohnSSI_0-1714394235341.png

 

And the Excelfile:

JohnSSI_1-1714394294021.png

 

BrunPierre
Partner - Master
Partner - Master

Your goal is to substitute 'Not Set' with 'OldAcron' values. Hence, try

MapExcel:
Mapping LOAD Ticket,
OldAcron
FROM ... Sheet1;

Data:
LOAD *,
If(ACRON='Not Set', ApplyMap('MapExcel', Ticket),Service_Lookup__c) as ACRON1;

LOAD ...
If(IsNull(Service_Lookup__c),'Not Set',SubField(SubField(SubField(Service_Lookup__c,' '),';'),'_')) as ACRON,
...

DROP Field ACRON;
RENAME Field ACRON1 to ACRON;

John-SSI
Contributor III
Contributor III
Author

Yeah, getting close here 🙂
I just wanna do something like this: (Mayby easier)
If(IsNUll(Service_Lookup__c), ApplyMap('MapExcel', ShowTheOldAcron),Service_Lookup__c) as ACRON,

BrunPierre
Partner - Master
Partner - Master

If(IsNull(Service_Lookup__c), ApplyMap('MapExcel', CaseNumber), Service_Lookup__c) as ACRON

@John-SSI Read on ApplyMap - script function

John-SSI
Contributor III
Contributor III
Author

Seems to work now, i was forced to texformatting CaseNumber from DB and Excel