Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikmpate0
Creator II
Creator II

Problem calculating correct percentages

I have a straight table, of trade, no of customers and sales and units.

I'm trying to calculate the % of sales and units using this expression, but getting incorrect figures for %Units and %Sales(see below)

this is the expression I'm using for %units - (Sum([Qty])/(sum([Qty - TOTAL - Present])*100))

and for %sales I'm using  (sum([Sales $]/[Sales - TOTAL - Present]))*100

example of %units

class of trade total unit/total units * 100 to get % units

eg 79,728/43856,231 * 100 = 0.182%

Do I need to put it in my script, of calculate as an expression?

      

Class of TradeNo of CustomersTotal UnitsTotal Sales% Units% Sales
AGENCY1979,728247,6431.49%2.07%
DECORATOR702,064,4814,535,47412.38%16.86%
DISTRIBUTOR9838,485,801108,168,46667.51%69.18%
MANUFACTURER352,531138,689.11%.11%
RETAIL9412,017356,427.38%.51%
WHOLESALE452,433,5734,398,9526.76%8.17%
-33328,100675,87811.36%3.09%
27743,856,231118,521,528100.00%100.00%

so confused on where I'm going wrong can someone relieve my misery.

Thanks in advance.

regards

M

22 Replies
qlikmpate0
Creator II
Creator II
Author

Thank you so much I was totally missing the totals and getting confused with my total Qtys and sales.

Thank you so much for helping.

Thanks again.

vvira1316
Specialist II
Specialist II

you meant

You were using Qty for your Total Units... Try this

sunny_talwar

I meant that Mina was using OrderQty for Total Units instead of Qty...whereas her initial post was using this expression.. which made me think that she is using Qty...

Capture.PNG