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: 
Not applicable

Remove part of a string

Hi I have a string in a variable vCourseFamily 'abc', 'def','hhh' . I want to remove the last part of the string 'hhh' from the string. Kindly suggest.

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Concat({<CourseFamily -= {'hhh'}>} DISTINCT chr(39)&'*' & [CourseFamily]&chr(39) , ', ')

View solution in original post

7 Replies
settu_periasamy
Master III
Master III

Hi,

What is your expression for the variable vCourseFamily?

Not applicable
Author

=Concat(DISTINCT chr(39)&'*' & [CourseFamily]&chr(39) , ', ')

settu_periasamy
Master III
Master III

do you want to remove the last 3 characters? or it would by dynamic one?

Can you just post small qv app with output?

Not applicable
Author

I want any occurrence of the word 'hhh' in the above string to be removed

sunny_talwar

May be this

=Concat({<CourseFamily -= {'hhh'}>} DISTINCT chr(39)&'*' & [CourseFamily]&chr(39) , ', ')

richard_chilvers
Specialist
Specialist

In your CONCAT, can you not ignore [CourseFamily] whenever it contains 'hhh' ?

Not applicable
Author

Thanks Sunny!