Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ramrongala
Contributor II
Contributor II

How delimiter the data with many combinations

Hi Qlik Experts,

 

I need to arrange  the data  with good format.please find  below 

original_Values means actual data.

Need this format -- after modify data.

original_Values Need this format 
1 - NO fhdfhjfhfNO fhdfhjfhf
2 - fdfbfdfdf ABILITYfdfbfdfdf ABILITY
2. hgdgdb KNOWLEDGEhgdgdb KNOWLEDGE
3. hdshdsdhsd KNOWLEDGEhdshdsdhsd KNOWLEDGE
2 hhjhj INVOLVEDhhjhj INVOLVED
3 uyhgvfdw uyhgvfdw 

 

I used purgeChar(), KeepChar(),Subfield() but it effected reaming data (Please find the attached excel data for more understanding ).

Please help me.

4 Replies
Frank_Hartmann
Master II
Master II

Maybe like this:

 

LOAD 
if(index(orginal_Values,'>')=1,orginal_Values,if(index(orginal_Values,'-')=3,SubField(orginal_Values,' - ',2),
if(index(orginal_Values,' ')=2 or index(orginal_Values,'.')=2,
PurgeChar(orginal_Values,'234. '),orginal_Values))) as Test,
orginal_Values,
Requried_Values
FROM
[Data.xlsx]
(ooxml, embedded labels, table is Sheet1);

 

albertovarela
Partner - Specialist
Partner - Specialist

Hello there, 

As there is no consistent pattern I'd suggest you to use the Mapping Load and the ApplyMap function.

 

Map.jpg

For more details look at: Mapping Load and ApplyMap

 

I hope this helps.

 

 

ramrongala
Contributor II
Contributor II
Author

HI Frank,

 

Thank you for giving solution, But not full fill exactly.Please find below comments and output values.

Please help to solve the issue.

original_Values Required_Values After using your codeComments 
1 - NO fhdfhjfhfNO fhdfhjfhfNO fhdfhjfhfworking as expected 
2 - fdfbfdfdf ABILITYfdfbfdfdf ABILITYfdfbfdfdf ABILITY
3 - hgh jjklhgh jjklhgh jjkl
4 - Suragaa gjjhSuragaa gjjhSuragaa gjjh
2. hgdgdb KNOWLEDGEhgdgdb KNOWLEDGEhgdgdbKNOWLEDGEhere combined into one single word(removed space) but need space between 
3. hdshdsdhsd KNOWLEDGEhdshhsd KNOWLEDGEhdshdsdhsdKNOWLEDGE
4. hdffhufh KNOWLEDGEhdffhufh KNOWLEDGEhdffhufhKNOWLEDGE
5. uytwyewy KNOWLEDGEuytyewy KNOWLEDGEuytwyew KNOWLEDGE
1 hjuyt DEMANDhjuyt DEMAND1hjuytDEMANDhere also space need between 2 words and where starting with 1 that value including 1 and combined (like 1hjuytDEMAND)
2 hhjhj INVOLVEDhhjhj INVOLVEDhhjhj INVOLVED
3 uyhgvfdw uyhgvfdw uyhgvfdw 
4 bfgffbananjbfgffbananjbfgffbananj
5 hgtf jhugggygyghgtf jhugggygyghgtf jhugggygyg
ramrongala
Contributor II
Contributor II
Author

HI Frank,

I think below excel format is not good so i am attaching the excel format.

Please have a look my comments in excel(sheet 2 tab).