Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Rename values in a field

Hi All,

I have two fields in my two separate tables one from Salesforce and other sharepoint. "Campaign Type" and "Activity"

   

Campaign TypeActivity
Advertising - DigitalAdvertising - Digital
Advertising - Offline/AdvertorialAdvertising - Offline/Advertorial
Content SyndicationContent Syndication
SearchPaid Search
Search - PaidSocial Media
Social MediaSocial Media Promotion

What I am looking to do is map these two fields together. The issue is with "Search" and "Search - Paid" (campaign type table) which I want to group it and rename as "Paid Search" and group "Social Media" & "Social Media Promotion"(Activity table)  and rename it to "Social Media". So that we could get a proper mapping

Can you help me with the script?

4 Replies
Clever_Anjos
Employee
Employee

MapTable:

Mapping load * inline [

F1,F2

Search,Search - Paid

Social Media,Social Media

Social Media Promotion,Social Media

];

Map field Activity using MapTable;

its_anandrjs

Did you map campaign type with activity.

Anonymous
Not applicable
Author

No I haven't. "Campaign Type" comes from salesforce and "Activity" comes from sharepoint file. To give you a background. I am trying to figure out the ratio for pipeline vs budget spend.

There is pipeline $ attributed to "Campaign Type" and Budget Spend $ attributed to "Activity". So If I can map the two fields I could calculate the ratio.

its_anandrjs

Map this way

MapTable:

Mapping

LOAD * Inline

[

Campaign Type, Activity

Advertising - Digital, Advertising - Digital

Advertising - Offline/Advertorial, Advertising - Offline/Advertorial

Content Syndication, Content Syndication

Search, Paid Search

Search - Paid, Paid Search

Social Media, Social Media Promotion

];

Campaign:

LOAD *,ApplyMap('MapTable',[Campaign Type],'None') as Activitymap;

LOAD * Inline

[

Campaign Type

Advertising - Digital

Advertising - Offline/Advertorial

Content Syndication

Search

Search - Paid

Social Media

];