Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Avoid resident table to calculate a field in LOAD Statement

Hi All,

Not entirely sure whether this can be done however my question is whether somehthing can be done more efficently and cleanly.

My script is as follows:-

Stock:

LOAD

Item,

Quantity

From "qvd file A";

Outer Join (Stock)

LOAD

Item,

Delivery,

Dispatch

From "qvd file B";

AvailableStock:

LOAD

Item,

Quantity,

Delivery,

Dispatch,

Quantity + Delivery - Dispatch as AvailableLevel

Resident Stock;

DROP Table Stock

Is there a cleaner means to achieving the same thing i.e. do away with having to load the table in from memory and then drop it?

Thanks in advance.

C

1 Reply
Luminary
Luminary

Re: Avoid resident table to calculate a field in LOAD Statement

I don't think there's a quicker / neater way to achieve the same end result as the fields for the 'AvailableLevel' colculation only come together after the Outer Join.

If ther they were already together you could use a preceeding load to get to the end result:

AvailableStock:

Load *,

     Quantity+Delivery-Dispatch as AvailableLevel;

Load Item,

     Quantity,

     Delivery,

     Disptach

From "Ready Merged QVD File";

But I'm assuming that's not an option.

Apologies I couldn't be more assistance.

All the best,

Matt - Visual Analytics Ltd

Qlikview Design Blog: http://QVDesign.wordpress.com

@QlikviewBI

Community Browser