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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
qingkong
Contributor III
Contributor III

Replace Multiple conditions

I want to replace these values, so the first column is ROH WH, and the second column is ROH MFG.

How do I write the replace function

P101.png

Labels (2)
1 Solution

Accepted Solutions
GeorgePhilips23
Partner - Contributor III
Partner - Contributor III

SLoc:
LOAD
SLoc,
If(WildMatch(SLoc,'P101','P102','P103','P104','P105'
,'P106','P107','P108','P109','P110','P111','P401','P402'),'ROH WH',
If(WildMatch(SLoc,'P301','P302','P303','P304','P305'
,'P306','P307','P308'),'ROH MFG')) as Modified_SLoc

FROM [lib://DataFiles/TEXT.xlsx]
(ooxml, embedded labels, table is Sheet1);

View solution in original post

5 Replies
Chanty4u
MVP
MVP

can you explain with more detail information?

 

what is the replace value ?   and what is expected output?

qingkong
Contributor III
Contributor III
Author

dear:
            The attached data is replaced with the values on the picture

replace1.JPG

GeorgePhilips23
Partner - Contributor III
Partner - Contributor III

SLoc:
LOAD
SLoc,
If(WildMatch(SLoc,'P101','P102','P103','P104','P105'
,'P106','P107','P108','P109','P110','P111','P401','P402'),'ROH WH',
If(WildMatch(SLoc,'P301','P302','P303','P304','P305'
,'P306','P307','P308'),'ROH MFG')) as Modified_SLoc

FROM [lib://DataFiles/TEXT.xlsx]
(ooxml, embedded labels, table is Sheet1);

qingkong
Contributor III
Contributor III
Author

Thank you perfect

MarcoWedel
MVP
MVP