2 Replies Latest reply: Dec 7, 2016 4:09 AM by Magnus Buseth RSS

    Average sales per product across all customers

    Magnus Buseth



      I'm looking for a way to calculate and chart the average sales of different products across all customers. By default Qlik Sense seems to calculate the average sales per customer who purchased that item.


      What I get: Total sales of apples / Customers who purchased apples

      What I want: Total sales of apples / Total customers

      I'm currently using this expression: Sum(SALES)/Count(distinct CUSTOMER_ID)

      What would be the correct expression?


      Below is some sample data I created to explain the problem. The table shown in the screenshot is the complete dataset. In this example, a single customer have purchased a lime, so the average sales of lime is 1 in the chart. I would like this to be 0,1 (sales divided by all customers).