3 Replies Latest reply: Nov 12, 2010 5:18 PM by John Witherspoon RSS

    Help with Gross Profit %

    Chris Hopkins

      Hi, I am trying to work out Gross Profit.

      I think the fields i need to use are salesvalue-cost/salesvalue... am i right?

      i have to calculate an expression to get my total sales value and total cost value. My expressions are:


      sum(aggr(sum({$<LineType -= {V}>} total <EAN> SalesValue),[Cust Name],[Product Code],[Prod Desc],EAN,Size,PriceOverride))

      and

      sum(aggr(sum({$<LineType -= {V}>} total <EAN> ItemCost),[Cust Name],[Product Code],[Prod Desc],EAN,Size,PriceOverride))

      Can anyone tell me what i would need to write to get the GP please?

       

        • Help with Gross Profit %
          Karl Pover

          The following expression doesn't work?

          sum({$<LineType -= {V}>} total <[Cust Name],[Product Code],[Prod Desc],EAN,Size,PriceOverride> ItemCost)

          Regards.

            • Help with Gross Profit %
              Chris Hopkins

              Hi, thanks for your reply again, No that expression doesn't work....

              Can anyone help?

                • Help with Gross Profit %
                  John Witherspoon

                  If you know the right expressions for sales and for cost, and you know how to calculate gross profit from sales and cost, where is the confusion? The only thing I'd point out is that (A-B)/A = 1-B/A. So gross profit margin is also 1-cost/sales, which will save you having to calculate the sales twice. So assuming you have the right expressions for sales and for cost:

                  1-sum(aggr(sum({$<LineType -= {V}>} total <EAN> ItemCost ),[Cust Name],[Product Code],[Prod Desc],EAN,Size,PriceOverride))
                  /sum(aggr(sum({$<LineType -= {V}>} total <EAN> SalesValue),[Cust Name],[Product Code],[Prod Desc],EAN,Size,PriceOverride))