Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
garethct
Contributor

Load from in Script

Hi all,

I'm trying to create a first vendor account number for each unit.

Below is my script,

trace ;

trace --- Customer ---;

LOAD VENDOR.C_COMPANY,

     VENDOR.ACCNO,

     %_VNO,

     %_C_GROUP,

     VENDOR.C_COMPANY_ORIG,

     VENDOR.C_NAME,

     VENDOR.CATEGORY,

     VENDOR.CATEGORY_USED,

     VENDOR.CATEGORYBUYER,

     VENDOR.REPNUMBER,

     VENDOR.REPNAME,

     VENDOR.C_GROUP,

////////////# Vendors per Reg////////////////

FirstSortedValue(VENDOR.ACCNO,UNIT.SOLD_DATE,1) as FirstVendor

    

    

FROM

[$(QVD_Path)\BUYER_customer.qvd]

(qvd);

I believe it's incorrect because UNIT.SOLD_DATE isn't in the same table, it is loaded from the Unit table before the Customer table. How do I get around this?

Thanks

Gareth

3 Replies
Highlighted
MVP
MVP

Re: Load from in Script

If the tables are rightly linked with key field, you could use FirstSortedOrder() in the front-end in a chart. Otherwise, to do it in the script, you have to join the tables and bring it in the same table.

garethct
Contributor

Re: Load from in Script

Thanks for your response,

How would I join the tables?

Thanks

Gareth

kawamuram
Contributor II

Re: Load from in Script

Hi,

Could you share the tables you need to join?

Thanks