4 Replies Latest reply: Aug 14, 2017 12:42 PM by Christopher Queiser RSS

    Calculate Margin with variable and fixed costs

    Christopher Queiser

      Hi.

      I am brand new to Qlikview.

      I've collected my data with an MySQL Database and it works fine.

       

      I've also started to implement the first dashboard in Qlik Cloud. But now i am struggling with the absolute margin of sales.

       

      I have 4 tables:

      BranchesEmployeesOrdersProducts
      idididid
      energy_costssalarybranch-idselling_price
      rental_costsbranch-idbuying-timebuying_price
      product-id
      quantity
      buying-time

       

      The calculation of the margin works like charm with this formula (devision through 100 cuz the values saved as cent):

      ((Sum(price) - Sum(buying_price)) * Count(quantity)) / 100

       

      How i am able to calculate the absolute margin including the energy costs, rental costs and salary of every employee linked to its branch? The costs and salary counting only once per month.

       

      I was trying with this formula but doesn't work - the margin is higher than the total income:

      (((Sum(price) - Sum(buying_price)) * Count(quantity)) - (Sum(energy_costs) + Sum(rental_costs) - Sum(salary)) / 100

       

      Thanks for your help.

      Best C