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

derive new field from another field

i have

id=INS-2014-00001-FIN-00001-SUB-00001

using above field i want to derive below field in script

example:left(INS-2014-00001-FIN-00001-SUB-00001,24) as new_Field

INS-2014-00001-FIN-00001 as new_Field

is there any other way to split (Derive )

10 Replies
qlikviewwizard
Master II
Master II

Capture.JPG

Hi use the below script.

Derive_New_Field:

LOAD

*,

Subfield(ID,'-SUB', 1) AS NewID;

LOAD * INLINE [

ID

INS-2014-00001-FIN-00001-SUB-00001

INS-2014-00001-FIN-00002-SUB-00002

INS-2014-00001-FIN-00003-SUB-00003

INS-2014-00001-FIN-00004-SUB-00004

INS-2014-00001-FIN-00005-SUB-00005

INS-2014-00001-FIN-00006-SUB-00006

INS-2014-00001-FIN-00007-SUB-00007

INS-2014-00001-FIN-00008-SUB-00008

];