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

string parse

Hi,

How can I replace un unwanted comma in a string?

Applied rules:%BusinessUnitKey="Life Science", Business Area="Uthyrning, 10", RegionCode="40", RegionCode="30"

Need to loose the comma in "Uthyrning, 10", and only that, so I can flatten the table with SubString(txt,',') as txt

regards

thomas

1 Solution

Accepted Solutions
tresesco
MVP
MVP

I guess you meant SubField(), if so see if this works:

SubField( YourField, '",')                // separator is ",  (double quates followed by a comma)

And if you want to remove the commas after it gets separated, you can use PurgeChar() on it.

View solution in original post

5 Replies
Gysbert_Wassenaar

Perhaps you can replace ", with "; and the split on ; instead of ,

subfield( replace(txt, '",','";'),';')


talk is cheap, supply exceeds demand
Not applicable
Author

Not sure what exactly you need,

Try SubField(Business Area,',',1) to split by delimiter

Try Replace(Business Area,',','') to remove comma

Regards,

Prabhu

tresesco
MVP
MVP

I guess you meant SubField(), if so see if this works:

SubField( YourField, '",')                // separator is ",  (double quates followed by a comma)

And if you want to remove the commas after it gets separated, you can use PurgeChar() on it.

Not applicable
Author

Well gysbert, that won't change much - then I'll have the same problem with ';'

Anonymous
Not applicable
Author

You may try below,

Business Area='Uthyrning'&Chr(44)&' 10'