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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jood_ahmad
Creator II
Creator II

text after char

Dears,

how can i get the text after specific char like if i have :

ad,sj2

0,2

0,10

jak,kavin

and i need the just to retrieve only the char after the ','  i try the right but i cant apply it in all cases some time i did not get the right data

any idea about this .

1 Solution

Accepted Solutions
jood_ahmad
Creator II
Creator II
Author

Dears,

thank you very much to your replay the closest answer is Sunny

SubField(FieldName, ',', 2) as NewFieldName 


the addition thing is define a variable to count how mane char after the ',' .


thank you all

View solution in original post

11 Replies
sunny_talwar

Have you tried SubField()?

May be this:

SubField(FieldName, ',', 2) as NewFieldName

or

SubField(FieldName, ',', -1) as NewFieldName

Anonymous
Not applicable

Sunny, with this expression he will get complete subfield from specified location but as asked by him


and i need the just to retrieve only the char after the ','

I think he need char only, like say

ad,sj2    Here he should get sj onlly instead of sj2

Ahmad, Is it right??

sunny_talwar

May be this in that case?

PurgeChar(SubField(FieldName, ',', 2) as NewFieldName, '0123456789') as NewField

mohsinqlik
Partner - Creator
Partner - Creator

Adding to logic sunny shared

purgechar(SubField(FieldName, ',', 2),1234567890) as NewFieldName


Regards,

Mohsin

Anonymous
Not applicable

Good One Sunny

Will this alias work inside the field parameter?

sunny_talwar

Thanks man

sunilkumarqv
Specialist II
Specialist II

perhaps you can use like this

subfield(PurgeChar(FieldName,'0123456789'), ',',2)  as NewField

jood_ahmad
Creator II
Creator II
Author

yes

jood_ahmad
Creator II
Creator II
Author

Dears,

thank you very much to your replay the closest answer is Sunny

SubField(FieldName, ',', 2) as NewFieldName 


the addition thing is define a variable to count how mane char after the ',' .


thank you all