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

Help needed in Load script

Hi

I am getting field not found error in my script. My script looks like this:

LOAD

    *,

if([Article Id] >= '42635' and [Article Id]<= '48733', [Quantity in stock]) as SS

;

Stockvalue:

LOAD

     art_id as [Article Id],

     attr2_id,

     qty as [Quantity in stock],

     price as [Stock price],

     rate

FROM $(DIR_TRANSFORMATION)WeeklyStockValue.qvd (qvd)

;

Now, when I reload, I get field not found <Article Id>. Can anyone help me, what am I doing wrong here? Please!

1 Solution

Accepted Solutions
Not applicable
Author

hi Try this

Stockvalue:


LOAD

    *,

if([Article Id] >= '42635' and [Article Id]<= '48733', [Quantity in stock]) as SS

;

LOAD

     art_id as [Article Id],

     attr2_id,

     qty as [Quantity in stock],

     price as [Stock price],

     rate

FROM $(DIR_TRANSFORMATION)WeeklyStockValue.qvd (qvd)

;

Regards

Sravan

View solution in original post

6 Replies
Not applicable
Author

Try this:

Stockvalue:

LOAD

     art_id as [Article Id],

     attr2_id,

     qty as [Quantity in stock],

     price as [Stock price],

     rate

FROM $(DIR_TRANSFORMATION)WeeklyStockValue.qvd (qvd)

;

LOAD

    *,

if([Article Id] >= '42635' and [Article Id]<= '48733', [Quantity in stock]) as SS

Resident Stockvalue;

Not applicable
Author

Hi,

thanks for the reply. But now I get error message, "Table not found Stockvalue ".

Not applicable
Author

hi Try this

Stockvalue:


LOAD

    *,

if([Article Id] >= '42635' and [Article Id]<= '48733', [Quantity in stock]) as SS

;

LOAD

     art_id as [Article Id],

     attr2_id,

     qty as [Quantity in stock],

     price as [Stock price],

     rate

FROM $(DIR_TRANSFORMATION)WeeklyStockValue.qvd (qvd)

;

Regards

Sravan

Not applicable
Author

Hi Sravan,

Thank you. It worked! Even when I removed the alias "Stockvalue". But why doesn't the top load statement work when I put it at the  top of the tab that contains this script? Anyone?

Best regards,

Not applicable
Author

Stockvalue:

// Step2: Here Qlikview understands the field [Article Id] rather than art_id because it is already loaded  in before Load as [Article Id].


LOAD

    *,

if([Article Id] >= '42635' and [Article Id]<= '48733', [Quantity in stock]) as SS

;

//Step1: Here the art_id is loaded as [Article Id]. Qlikview does know only art_id at this moment.

LOAD

     art_id as [Article Id],

     attr2_id,

     qty as [Quantity in stock],

     price as [Stock price],

     rate

FROM $(DIR_TRANSFORMATION)WeeklyStockValue.qvd (qvd)

;

Not applicable
Author

Dear Syed,

If it solved please click as solved so that other users may benefit.

if you still dont understand you can ask questions!