Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
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.