Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
dsharmaqv
Creator III
Creator III

Data Cleaning

IDBusiness line
1Retail Banking,Privet Banking,Whole Sale
2Retail Banking(RB);Privet Banking(PB),Whole Sale
3Retail Banking(RB);Privet Banking(PB);Whole Sale

Output

IDBusiness Line
1Retail Banking
1Privet Banking
1Whole Sale
2Retail Banking
2Privet Banking
2Whole Sale
3Retail Banking
3Privet Banking
3Whole Sale

Can some one help me achiving the out put

I tried with subfield function but subfield is not able to remove ','

5 Replies
MK_QSL
MVP
MVP

Load

     ID,

     SubField([Business line],',') as [Business Line]

From TableName;

dsharmaqv
Creator III
Creator III
Author

can I have the sample app please

MK_QSL
MVP
MVP

//Load this in your QVW and run the script.

Data:

LOAD ID,

     SubField(Replace([Business line],';',','),',') as [Business Line]

FROM

[https://community.qlik.com/thread/246434]

(html, codepage is 1252, embedded labels, table is @1);

stabben23
Partner - Master
Partner - Master

You need to replace first, then use subfield.

Temp:
Load *,
subfield(BussinesLine1,',') as BussinesLine2
;
LOAD *,
Replace(BussinesLine,';',',') as BussinesLine1
;
LOAd * inline [
Id, BussinesLine
1, "Retail Banking,Privet Banking,Whole Sale"
2, "Retail Banking(RB);Privet Banking(PB),Whole Sale"
3, "Retail Banking(RB);Privet Banking(PB);Whole Sale"
]
;

stabben23
Partner - Master
Partner - Master

more elegant solution, use this.