Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to multiple replace into single replce funcation

Hi Experts,

I am Qlikview learner..\

My expression like below..

Replace(Replace(Replace(Replace(Replace(Replace(Replace([Meeting Type Code],'GRP','Group Meeting'),'CCL','Conference Call'),'DINNER','Dinner'),'LUNCH','Lunch'),'BREAKFAST','Breakfast'),'GBR','Break'),'DINE','Dinner') as [Meeting Type Code]

How to Write single replace or any other way is there..

Thanks,

Nagarjuna

4 Replies
Anil_Babu_Samineni

May be this?

Pick(Match([Meeting Type Code], 'GRP', 'CCL', 'DINNER', 'LUNCH', 'BREAKFAST', 'GBR', 'DINE'), 'Group Meeting', 'Conference', 'Dinner', 'Lunch', 'Breakfast', 'Break', Dinner') as [Meeting Type Code]

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
teempi
Partner - Creator II
Partner - Creator II

Hi,

Based on the example I think you should take a look at the Applymap() function. It seems you want to convert values to different values, not just replace a few characters. Something like this should do the trick:

MeetingTypeCode_MAP:

MAPPING LOAD * INLINE [

OriginalCode, ReplacementCode

GRP, Group Meeting

CCL, Conference

DINNER, Dinner

LUNCH, Lunch

BREAKFAST, Breakfast

GBR, Break

DINE, Dinner

];

Then in your load statement you can use this:

LOAD

...

Applymap('MeetingTypeCode_MAP', [Meeting Type Code], 'Unknown') AS NewMeetingTypeCode

...

-Teemu

Anonymous
Not applicable
Author

Thank you!!!!!!

Anil_Babu_Samineni

NP, Please close this thread Qlik Community Tip: Marking Replies as Correct or Helpful

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful