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

amt to store in qvd

I have this data which is Id and amount field i want to sum all row and store this into qvd data file. this time it is single fielf but need to add more field.

ECR-110,487512

ECR-110,369852

ECR-111,147852

ECR-112,369852

ECR-113,458236

-Jay

1 Solution

Accepted Solutions
its_anandrjs

Hi,

If you are asking about the total amount then try this way in the script with store in any variable.

Table1:

LOAD * Inline      [

Id,amount

ECR-110,487512

ECR-110,369852

ECR-111,147852

ECR-112,369852

ECR-113,458236  ];

TotalSale:

LOAD

Sum(amount) as Total

Resident Table1;

Store TotalSale into TotalSale.qvd;

If there is more fields then add that also and aggregate your data according to fields

Regards

Anand

View solution in original post

6 Replies
its_anandrjs

Hi,

If you are asking about the total amount then try this way in the script with store in any variable.

Table1:

LOAD * Inline      [

Id,amount

ECR-110,487512

ECR-110,369852

ECR-111,147852

ECR-112,369852

ECR-113,458236  ];

TotalSale:

LOAD

Sum(amount) as Total

Resident Table1;

Store TotalSale into TotalSale.qvd;

If there is more fields then add that also and aggregate your data according to fields

Regards

Anand

prieper
Master II
Master II

Try:

SummarizedValues:

LOAD

id,

SUM(Amt)          AS SumAmount

RESIDENT

MyTable

GROUP BY

id;

STORE SummarizedValues INTO .....qvd (qvd);

DROP TABLE SummarizedValues;

HTH Peter

Not applicable
Author

Is this works when i add more fields then how it comes.

Jay

its_anandrjs

Yes it is worked then write

Table1:

LOAD * Inline      [

Id,amount

ECR-110,487512

ECR-110,369852

ECR-111,147852

ECR-112,369852

ECR-113,458236  ];

TotalSale:

LOAD

Sum(amount) as Total

Resident Table1

Group By Id;//And add here more fields

Regards

Anand

Not applicable
Author

Thanks all of you for nice response for clearing me, sorry it is small question.

Jay

maxgro
MVP
MVP

tst