Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatenate field & subfield

Hello,

I am trying to concatenate a subfield (Device_Type), created by myself through script code, with an existing field ([Software version]) from the data source (being an .xlsx). Below is the piece of code that seems to be giving the error in bold:

DefectsList:

QUALIFY *;

UNQUALIFY [Defect ID], [JIRA ID];

LOAD DISTINCT

     SubField(Device, ';') as Device_Type,

     [Software version],

     Device_Type&' '&[Software version] as Device_Software

FROM

[$(vPathName)bronbestand QV.xlsx]

(ooxml, embedded labels);

UNQUALIFY *;

There doesn't seem to be an awful lot about it on the web, so help would be most welcome, thank you!

4 Replies
sunny_talwar

Try this by taking the Device_Type and Software conversion concatenation to the preceding load.

QUALIFY *;

UNQUALIFY [Defect ID], [JIRA ID];

DefectsList:

LOAD *,

     Device_Type&' '&[Software version] as Device_Software;

LOAD DISTINCT

     SubField(Device, ';') as Device_Type,

     [Software version]

FROM

[$(vPathName)bronbestand QV.xlsx]

(ooxml, embedded labels);

UNQUALIFY *;

tamilarasu
Champion
Champion

Hi Robin,

You can try,

QUALIFY *;

DefectsList:

LOAD DISTINCT

    SubField(Device, ';') as Device_Type,

    [Software version],

    SubField(Device, ';')  &' '& [Software version] as Device_Software

FROM

[$(vPathName)bronbestand QV.xlsx]

(ooxml, embedded labels);


UNQUALIFY *;


UNQUALIFY [Defect ID], [JIRA ID] => You don't need this line, since you are not loading these two fields from excel.


Not applicable
Author

Thank you very much, this solved it!

Not applicable
Author

Hi Tamil,

My apologies. These fields actually are being loaded, but I forgot to delete them. I simply only wanted to post the relevant code. Thanks anyways!