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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Remove values after minus symbol

Hi,

I'm loading data from sample.qvd file where from the values are coming as illustrated below in the table format "Current Output" but I need output like "Required Output" column.

Current OutputRequired Output
Parent-ABC-111Parent-ABC-111
Parent-ABC-111-AB0Parent-ABC-111
Parent-ABC-111-AB1Parent-ABC-111

Regards,

1 Solution

Accepted Solutions
jpapador
Partner - Specialist
Partner - Specialist

If you always want the first three you could do something like the following:

Subfield([Current Output], '-', 1) & '-' & Subfield([Current Output], '-', 2) & '-' & Subfield([Current Output], '-', 3) as [Required Output]

View solution in original post

2 Replies
jpapador
Partner - Specialist
Partner - Specialist

If you always want the first three you could do something like the following:

Subfield([Current Output], '-', 1) & '-' & Subfield([Current Output], '-', 2) & '-' & Subfield([Current Output], '-', 3) as [Required Output]

Anonymous
Not applicable
Author

Or maybe something like this :

     = left (  'Parent-ABC-111-AB0' ,  index ( 'Parent-ABC-111-AB0' , '-' , 3) -1 )