Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Carlaf_93
Creator II
Creator II

kpy problem

Good afternoon,

i've got a problem with this dataset.

If i use the formula sum(VALUE/QUANTITY) i don't get the right sum of price...

What do i need to do?

Carlaf_93_1-1663161133680.png

This the wrong kpy --> it should be   1.113.041

Carlaf_93_2-1663161180563.png

 

 

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

I assume these data aren't loaded within Qlik else exported from there. In this case there are any duplicates within the data which aren't displayed within this table because only distinct combinations of field-values are shown. You could check this by adding a recno() and rowno() to your load and including these fields within your table, too.

- Marcus

View solution in original post

4 Replies
marcus_sommer

Try it with: sum(aggr(sum(VALUE/QUANTITY), customer, code))

- Marcus

Carlaf_93
Creator II
Creator II
Author

I tryed this one:

SUM(AGGR(SUM(DISTINCT FLOOR(VALUE/QUANTITY,0.1)),KEY3))

 

where KEY3 IS customer & '_' & code in the script area.

This is the best one but not  the same as the sum....

I've got many data and doesn't work with all of them...

other ideas?

 

Thanks

marcus_sommer

I assume these data aren't loaded within Qlik else exported from there. In this case there are any duplicates within the data which aren't displayed within this table because only distinct combinations of field-values are shown. You could check this by adding a recno() and rowno() to your load and including these fields within your table, too.

- Marcus

MarcoWedel

how did you calculate 1.113.041 ?