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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

whta's the error?

Hi,

I want to know what's the error in this script?

it said to me "field Inv_Date not found" and takes alot of time in reloading in the step of join colored with red

CASH_RECEIPTS:

LOAD CASH_RECEIPT_ID,

     RECEIPT_DATE

from load\Cash_Receipts.qvd(qvd);

Invoice:

LOAD Invoice_ID,

     Invoice_Date

from load\Invoice.qvd(qvd);

Receivables:

LOAD CASH_RECEIPT_ID,

     Invoice_ID

from load\Receivables.qvd(qvd);

Aging:

LOAD

     Rec_Date-Inv_Date as [Days Over],

     if(Rec_Date-Inv_Date<=0,'On Time',

     if(Rec_Date-Inv_Date>0 and Rec_Date-Inv_Date<31,'1-30',

     if(Rec_Date-Inv_Date>30 and Rec_Date-Inv_Date<61,'31-60',

     if(Rec_Date-Inv_Date>60 and Rec_Date-Inv_Date<91,'61-90',

     if(Rec_Date-Inv_Date>90 and Rec_Date-Inv_Date<121,'91-120',

     if(Rec_Date-Inv_Date>120 and Rec_Date-Inv_Date<151,'121-150',

     if(Rec_Date-Inv_Date>150,'Over 150'))))))) as Payment_Interval;

LOAD CASH_RECEIPT_ID,

     RECEIPT_DATE as Rec_Date

Resident CASH_RECEIPTS;

right join LOAD CASH_RECEIPT_ID,

               Invoice_ID

Resident Receivables;

right Join LOAD Invoice_ID,

          Invoice_Date as Inv_Date

Resident Invoices;

14 Replies
sivarajs
Specialist II
Specialist II

you need to use Invoice_Date instead Inv_Date because inside script it wont take the alias name

Not applicable
Author

And about how you construct the aging intervals, have you heard about the Class() function?

Not applicable
Author

Thanks Sivaraj, but after i changed it the error is

"field Invoice_Date is not found "

i don't know what's the error?

Not applicable
Author

no, i don't know this function

Could you Please clarify it to me?

Not applicable
Author

Hi Mona,

You can use below script.

Directory;

CASH_RECEIPTS:

LOAD CASH_RECEIPT_ID,

     RECEIPT_DATE

FROM

Join.xlsx

(ooxml, embedded labels, table is Sheet1);

Directory;

Invoice:

LOAD Invoice_ID,

     Invoice_Date

FROM

Join.xlsx

(ooxml, embedded labels, table is Sheet2);

Directory;

Receivables:

LOAD CASH_RECEIPT_ID,

     Invoice_ID

FROM

Join.xlsx

(ooxml, embedded labels, table is Sheet3);

LOAD CASH_RECEIPT_ID,

     Invoice_ID

Resident Receivables;

right join LOAD CASH_RECEIPT_ID,

     RECEIPT_DATE as Rec_Date

Resident CASH_RECEIPTS;

right Join LOAD Invoice_ID,

     Invoice_Date AS Inv_Date

Resident Invoice;

Aging:

LOAD

     Rec_Date-Inv_Date as [Days Over],

     if(Rec_Date-Inv_Date<=0,'On Time',

     if(Rec_Date-Inv_Date>0 and Rec_Date-Inv_Date<31,'1-30',

     if(Rec_Date-Inv_Date>30 and Rec_Date-Inv_Date<61,'31-60',

     if(Rec_Date-Inv_Date>60 and Rec_Date-Inv_Date<91,'61-90',

     if(Rec_Date-Inv_Date>90 and Rec_Date-Inv_Date<121,'91-120',

     if(Rec_Date-Inv_Date>120 and Rec_Date-Inv_Date<151,'121-150',

     if(Rec_Date-Inv_Date>150,'Over 150'))))))) as Payment_Interval;

     LOAD CASH_RECEIPT_ID,

     Invoice_ID,

     Rec_Date,

     Inv_Date

Resident Receivables;

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The last script fragment is trying to resident load from "Invoices", but the table was labelled "Invoice". Therefore Invoice_ID cannot be found as the table "Invoices" does not exist.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan,

I completely greed ur point.

and Join tables order also incorrect.

thats why, i resend complete script.

--Prabhu Ch

Not applicable
Author

Thanks Prabhu, I will try it.

Not applicable
Author

no it called invoices it's a syntax error in my writing the discussion, but the original script it's true.