Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Help Please~total cubic feet for all the boxes in a period

CompletedCubicMeasure:
load
OrderNo,
(sum(Width) * sum(Length) * sum(Height))/1728 as 'Cubic Space'  //row 1
resident ProcessingCubicMeasure group by OrderNo;


drop table ProcessingCubicMeasure;


for this code, what i want to do is to show the % of cubic feet our truck had loaded in any given period.

basically, if there are 4 boxes in one day, and each of them is 1 x 1 x 1, then the total cubic feet for the day should be (1+1+1+1) x (1+1+1+1) x (1+1+1+1).

help thanks!

1 Solution

Accepted Solutions
Not applicable

Re: Help Please~total cubic feet for all the boxes in a period

The inline load was just an example, you would still use the data stored on your server as is.  It looks like this is what you want:

CompletedCubicMeasure:
Load OrderNo,
(Width * Length *Height)/1728 as [Cubic Space]

Resident ProcessingCubicMeasure;

Drop Table ProcessingCubicMeasure;

Then you will be able to use Sum([Cubic Space]) as your Total Cubic Space and you can divide your Total Cubic Space by your Available Cubic Space to get your %.

5 Replies
Not applicable

Re: Help Please~total cubic feet for all the boxes in a period

To measure total cubic feet (with L, W, and H in feet):

Specs:

LOAD * INLINE [
    OrderNo, Width, Length, Height
    123, 1, 1, 1
    234, 2, 3, 4
    567, 5, 1, 3
    898, 4, 5, 6
    156, 3, 4, 4
    785, 4, 4, 4
]
;


LEFT JOIN
LOAD OrderNo,
Width * Length * Height as CubicSpace
Resident Specs;    

 

Then you could just sum the Cubic Space to find Total Cubic Space and divide the Total Cubic Space by the Total Available Space to find the % of Space Used.  Is this what you are looking for?

Not applicable

Re: Help Please~total cubic feet for all the boxes in a period

hi Rebecca,

     I cannot use the inline function because im pulling the data straight from the data stored on our server, so does that mean:

CompletedCubicMeasure:
load
OrderNo,
(sum(Width) * sum(Length) * sum(Height))/1728 as 'Cubic Space'                                     //row 1
resident ProcessingCubicMeasure group by OrderNo;


drop table ProcessingCubicMeasure;

is correct???

Not applicable

Re: Help Please~total cubic feet for all the boxes in a period

The inline load was just an example, you would still use the data stored on your server as is.  It looks like this is what you want:

CompletedCubicMeasure:
Load OrderNo,
(Width * Length *Height)/1728 as [Cubic Space]

Resident ProcessingCubicMeasure;

Drop Table ProcessingCubicMeasure;

Then you will be able to use Sum([Cubic Space]) as your Total Cubic Space and you can divide your Total Cubic Space by your Available Cubic Space to get your %.

christian77
Valued Contributor

Re: Help Please~total cubic feet for all the boxes in a period

Hi:

If you can't do it in the script, as they've recomended, try sum(aggr(Width * Length * Height, BoxNo, OrderNo)).

Not applicable

Re: Help Please~total cubic feet for all the boxes in a period

thank you so much Rebecca~

Community Browser