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: 
james_hanify
Creator
Creator

Using a variable within a load to concatenate?

Hi all,

I can't seem to figure out a way of doing this without pulling in more data which is making the load unnecessarily slow.

This is my code attempt:

LET vCompany = 'JIGS';

InvoiceDetails:

LOAD Z_ID as InvoiceKey,

           Z_ID&'*'&Z_ASSOC_ROW as InvoiceItemKey,

           'N' as Archived, // Some dictionaries being used include SM.INVOICE.PRT and SM.INVOICE.BU

           COMPANY&ITEM as ItemKey, // Using this currently

          // $(vCompany)&ITEM as ItemKey // AttemptMade -> Failed

           // $(vCompany)&''&ITEM as ItemKey // AttemptMade -> Failed

           ITEM as ProductCode,

           if(len(MISC_DESC)<1,Applymap('Mapping_ItemDescription',COMPANY&ITEM,null()),MISC_DESC) as  ProductCodeDescription,

           PRICE as UnitPrice,

           TAX_RATE as ItemTax,

           LINE_REBATE_C as Rebate,

           ITEM_LS_DISC as LinePrice, // sometimes this field does not show in STO if the item is 0, check on Qlikview if same anamoly happens, do qty x unitprice

           COS_V as Cost1,

           COST_VALUE as Cost2,

           LINECOST as Cost3;

          

SQL SELECT *

FROM SM_INVOICE_ITEM,SM_INVOICE WHERE SM_INVOICE_ITEM.Z_ID = SM_INVOICE.Z_ID AND SM_INVOICE.TRANDATE >=  '$(vGenDate)';

It tries to be using JIGS as the field name when I just want to concatenate it.

James

1 Solution

Accepted Solutions
sunny_talwar

May be try this:

'$(vCompany)' & ITEM as ItemKey

View solution in original post

2 Replies
sunny_talwar

May be try this:

'$(vCompany)' & ITEM as ItemKey

james_hanify
Creator
Creator
Author

Amazing, it works. Thanks