Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

abhonsle
New Contributor III

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
Employee
Employee

Re: Rename values in a field

MapTable:

Mapping load * inline [

F1,F2

Search,Search - Paid

Social Media,Social Media

Social Media Promotion,Social Media

];

Map field Activity using MapTable;

Re: Rename values in a field

Did you map campaign type with activity.

abhonsle
New Contributor III

Re: Rename values in a field

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.

Re: Rename values in a field

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

];