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

Exclude commas and include valued

Hi,
My input is:
Id,name,value
2,raj,23,45
3,raw,49
4,harsh,34,76,98

As this is comma seperated i am getting output as :
Id,name,value
2,raj,23
3,raw,49
4,harsh,34


But I need all the numbers in "Value" column. Please help how to get
Labels (2)
2 Replies
akumar2301
Specialist II
Specialist II

 

One Option :

 

Read each line  as fullrow or one column --> Split it into three cols using regular expression ( tExtractRegexFields) --> Output

 

Regex expr : "^(\\w+),(\\w+),(.*)"

 

Let me know if it works

vapukov
Master II
Master II

the most proper way - strongly ask (if it possible) to enquote strings in source export:

"4,\"harsh, any numbers of commas inside \",\"34,76,98"\"

it will properly handle any numbers of columns with commas inside 

 

if for some reason it is not possible (but in many cases it only look not possible unless you did not explain reasons for changes), and in case if you sure - only last column is wrong:

  • solution from @uganesh - must work
  • another similar solution - replace first XXX commas with | or ;