Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sum field after count distinct

Hello Qlikers!

Need help what  formula do I need for me to get the correct QTY  field.


correct QTY is derived by dividing QTY over # of LOTS per LOT TITLE.


I have done  sum(QTY) / # of LOTS but the result is 10639

or sum(QTY) / count(DISTINCT LOTS) = 23222.6


What I am after is the total of the correct QTY which is 168,649

    

LOTS# of LOTS        QTY     correct QTY
LOT 12       26,098            13,049
LOT 22        2,890              1,445
LOT 32       35,486            17,743
LOT 42       37,396            18,698
LOT 52       25,284            12,642
LOT 61       27,834            27,834
LOT 71       12,658            12,658
LOT 81       27,810            27,810
LOT 91       28,940            28,940
LOT 101        7,830              7,830
TOTAL15     232,226          168,649

thanks and hope I have explained my problem in detail.

10 Replies
its_anandrjs
Champion III
Champion III

Check this on your new thread

aggr