Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Excluding brackets on Text

Dear Experts,

Can some one help how to fix this issue.

i just want to exclude text " (XXX10103) "

# P1 Tickets - All Sources (%)** 2 months lag** (XXX10103) %

disply text like = # P1 Tickets - All Sources (%)** 2 months lag** %

Any suggession on resolving this issue

Many Thanks,

Niru

1 Solution

Accepted Solutions
ciaran_mcgowan
Partner - Creator III
Partner - Creator III

Hi Niru,

Yes, this will work in a listbox if you use <Expression> instead of an existing field. Is the text you are trying to replace always going to be (XXX10103) or will it change? If it does, then you might be better off using something like:

Left(YourFieldName, FindOneOf(YourFieldName, '(', 2)-1) & '%'

This will return everything to the left of the 2nd '(' and add a '%' to the end.

View solution in original post

7 Replies
Anonymous
Not applicable

Hi Niranjan,

Try this:

=Replace('# P1 Tickets - All Sources (%)** 2 months lag** (XXX10103) %',' (XXX10103) ','')

Regards!

NavinReddy
Creator II
Creator II
Author

Hi Manuel,

Thank you so much for your reply

in listbox i have many with the same format,

is this possible to implement same logic on listbox.

Regards,

Niru

Colin-Albert

Can you give some more examples so we can offer the best solution.

Does the text you want to exclude always start (XXX ?

ciaran_mcgowan
Partner - Creator III
Partner - Creator III

Hi Niru,

Yes, this will work in a listbox if you use <Expression> instead of an existing field. Is the text you are trying to replace always going to be (XXX10103) or will it change? If it does, then you might be better off using something like:

Left(YourFieldName, FindOneOf(YourFieldName, '(', 2)-1) & '%'

This will return everything to the left of the 2nd '(' and add a '%' to the end.

sunny_talwar

Can you elaborate a little more on your requirement

NavinReddy
Creator II
Creator II
Author

Thank You so much its working

ciaran_mcgowan
Partner - Creator III
Partner - Creator III

I should point out that if the are not always going to be brackets in the earlier part of the text, or more than 1, then the syntax above would change from

Left(YourFieldName, FindOneOf(YourFieldName, '(', 2)-1) & '%'

to

Left(YourFieldName, FindOneOf(YourFieldName, '(', SubStringCount(YourFieldName, '('))-1) & '%'


It all depends on the data you are working with.