6 Replies Latest reply: May 23, 2011 8:10 AM by Gabor Szikszai RSS

    Monthly distribution percentage

      Hi all!

       

      Please help me! I have a table like this:

       

      YearMonth
      Customer
      Product
      Distribution
      201103AX0
      201103BX1
      201103CX1
      201104AX1
      201104CX1
      201104DX1
      201105AX0
      201105CX1

       

      It contains many customers, many products and distribution. Distribution contains 0 or 1. 1 if the product presents at the customer.

       

      I would like to create a bar chart, and calculate distribution percentage by product by YearMonth.

       

      In sql like this:

      select YearMonth, Product, sum(Distribution) / count(Customer)

      from [Table]

      group by Yearmonth, Product

       

      How can I create this in QlikView?

       

      Thanks a lot!

      Waryou