Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Splitting string

Hi ,

I am displaying the chart title dynalically. i am using getFieldSelections(field) which gives results like 0430-ABC, 0554-ABC, 0676-BBC, 0823-CAB, 0875-GAP, 0909-CHD.

but i want display the chart title like B0430,B0554,B0676,B0823,B0875,B0909.

How i will split the string 430-ABC, 0554-ABC, 0676-BBC, 0823-CAB, 0875-GAP, 0909-CHD. and get the values like in the following format

B0430,B0554,B0676,B0823,B0875,B0909.

1 Solution

Accepted Solutions
vijay_iitkgp
Partner - Specialist
Partner - Specialist

use

Concat(Distinct B&Subfield(Field1,'-',1),',')

View solution in original post

7 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi

You can use  B&Subfield(Field1,'-',1)

v_iyyappan
Specialist
Specialist

Hi,

     use the label ='B'&''&left(field,4) .You will get the 'B' with first foru digit of Character i.e( B0430 )

Regards,

Iyyappan.

Not applicable
Author

This will give only one value(0430), but i want all the values should dispaly

lironbaram
Partner - Master III
Partner - Master III

you can use

=

concat(distinct 'B' & left(Field,4),',')

v_iyyappan
Specialist
Specialist

Hi,

     I attach sample QV  file.

Regards,

Iyyappan.

vijay_iitkgp
Partner - Specialist
Partner - Specialist

use

Concat(Distinct B&Subfield(Field1,'-',1),',')

Not applicable
Author

it's working.  Thank you very much.