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

Formula to extract last word in bracket() otherwise

Hi, does anyone know what expression i would use to achieve the following outcomes:

error loading image

Basically i want the expression to look at 'GroupName' and check if there is a name enclosed in brackets (), if so then return the name inside the brackets. Otherwise just give the name.

Regards???

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello,

The following should work (in the script)

If(Len(TextBetween(GroupName, '(', ')')), TextBetween(GroupName, '(', ')'), GroupName) AS NewField


Hope that helps.

View solution in original post

1 Reply
Miguel_Angel_Baeyens

Hello,

The following should work (in the script)

If(Len(TextBetween(GroupName, '(', ')')), TextBetween(GroupName, '(', ')'), GroupName) AS NewField


Hope that helps.