Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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
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;
Hi,
thanks for the reply. But now I get error message, "Table not found Stockvalue ".
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
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,
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)
;
Dear Syed,
If it solved please click as solved so that other users may benefit.
if you still dont understand you can ask questions!