Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
SchoolBoy
Contributor
Contributor

Sum and duplicate data

Hi,

 

How do I calculate the total of all invoices for the following table?

In this situation a single order from a specific customer may appear in several waybills.

The value in “order value” field refers to total value of specific invoice (and repeats in several lines)

 

day: 2020.01.01 customer: 00001 Invoice:000001 order value: 12 000 waybill number:1111111111

day: 2020.01.02 customer: 00001 Invoice:000001 order value: 12 000 waybill number:1111111112

day: 2020.01.03 customer: 00001 Invoice:000001 order value: 12 000 waybill number:1111111113

day: 2020.01.01 customer: 01011 Invoice:000032  order value: 15 300 waybill number:2111111123

day: 2020.01.01 customer: 01011 Invoice:000032 order value: 15 300 waybill number:3111111125

day: 2020.01.01 customer: 01055 Invoice:000134 order value: 5 300 waybill number: 4111125

day: 2020.01.01 customer: 01055 Invoice:000143 order value: 6 300 waybill number: 676111125

day: 2020.01.01 customer: 00001 Invoice:001231 order value: 300 waybill number: 123376111125

day: 2020.01.02 customer: 00001 Invoice:001232  order value: 300 waybill number: 123376111126

day: 2020.01.02 customer: 00001 Invoice:100003 order value: 2 300 waybill number: 123376111126

tbl_TEMP2:
LOAD * INLINE [
day, customer, Invoice, order value, waybill number
01.01.2020, 00001, 000001, 12000, 1111111111
02.01.2020, 00001, 000001, 12000, 1111111112
03.01.2020, 00001, 000001, 12000, 1111111113
01.01.2020, 01011, 000032, 15300, 2111111123
01.01.2020, 01011, 000032, 15300, 3111111125
01.01.2020, 01055, 000134, 5300, 4111125
01.01.2020, 01055, 000143, 6300, 676111125
01.01.2020, 00001, 001231, 300, 123376111125
02.01.2020, 00001, 001232, 300, 123376111126
02.01.2020, 00001, 100003, 2300, 123376111126
];

 

 

Thanks 

 

 

Labels (1)
1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

I'm not sure if this is what you need, but Qlik displays records in charts based on unique columns, see the image below.  The AGGR function creates a virtual table that can be used in SUM, MAX, MIN, etc...

aggr_sum.PNG

View solution in original post

2 Replies
jwjackso
Specialist III
Specialist III

I'm not sure if this is what you need, but Qlik displays records in charts based on unique columns, see the image below.  The AGGR function creates a virtual table that can be used in SUM, MAX, MIN, etc...

aggr_sum.PNG

SchoolBoy
Contributor
Contributor
Author

Thank you for your help