Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
atsushi_saijo
Creator II
Creator II

Total sum of specific field during loading script

Could we create a value and assign sum (=total) of specific column of a table, during the loading script?

[Example]

We have such source data. I needed to create a value, which is Sum(TOTAL Weight) during loading, and create value, like:

Let vTotalWeight =  Sum(TOTAL Weight) Resident DeliveryNote

PalletIDBoxIDWeight
1A5
1B3
2C8
3D4

****************************************

Let's create on QlikView. Above is:

DeliveryNote: Load * Inline [

PalletID,BoxID,Weight

1,A,5

1,B,3

2,C,8

3,D,4

] (delimiter is ',')

Could we create a value of total sum of Weight?

[Background]

I was trying creating an EDI source data (that will be further converted by the VAN vendor). In typical ASN message based on Delivery Note, we needed to place a total weight per delivery. Headers requires such values.

I appreciate for your advises in advance.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

TotalWeight_temp:

LOAD Sum(Weight)  as TotalWeight Resident DeliveryNote;

Let vTotalWeight = peek('TotalWeight ');

DROP TABLE TotalWeight_temp;


-Rob

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

TotalWeight_temp:

LOAD Sum(Weight)  as TotalWeight Resident DeliveryNote;

Let vTotalWeight = peek('TotalWeight ');

DROP TABLE TotalWeight_temp;


-Rob

atsushi_saijo
Creator II
Creator II
Author

Thank you for fast reply.

Shubham_Deshmukh
Specialist
Specialist

how to join total in inline data