Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get only part of data from column values?

Hi,

I have values in one column as below

43 side Drive, Leeds, GBR
67 Bradfield Way, Chard, GBR
345 Broadweird Road, Cwmbran, GBR
Verona Barn Chester Road, Barbridge Cheshire, GBR
21 Hulton Close, Southampton, GBR


How can I get values only

Leeds
Chard
Cwmbran
Cheshire
Southampton

Please can anyone suggest me soon please

Thanks.

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

If your field name is for example "Address" then write:

Subfield(Address,',',2)

let me know

Gysbert_Wassenaar

subfield(MyField, ',',2) will return the part between the first and second comma of MyField.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

Subfield(Fieldname,',',2) as Newfield

Then you will get the data wat ever you want.

Not applicable
Author

Thanks.

I can see the left space in the values at the starting of word. Please can suggest me how can I set this?

markodonovan
Specialist
Specialist

trim(Subfield('21 Hulton Close, Southampton, GBR',',',2))

Thanks

Mark

www.techstuffy.com

Not applicable
Author

Thanks. for some of the fields it is showing address values as below.

Input

Apartment 45, 45 Bell Barn Road, Birmingham, GBR

Output

45 Bell Barn Road

but actual output should be

Birmingham

How can I set this please suggest