3 Replies Latest reply: Sep 20, 2012 3:12 AM by Anton Gustle RSS

    Group orders by customers order count

      I have a table with orders which contains OrderDate, OrderNumber and CustomerNr

       

      I want a chart similar to the image. The first column should group customers order count. Meaning the first row, 1, should show every customers first order. 2 should show only "2nd orders".

       

      tmpscreen.JPG

       

      The expression i have used so far, as a dimension, is: Aggr(RowNo(), CustomerNr, OrderDate)

       

      However, I cant get it right. As you see, the order isnt correct if you look at the dates. Customer 001015534 have made two orders. The order made 2010-12-10 should be the 1st and the order 2012-05-24 the 2nd. Now its the other way around.

       

      How can I fix this? Is it better to solve in the script and how?

       

      Thanks