8 Replies Latest reply on Jan 31, 2018 12:26 PM by Giorge Luiz

    How to see % of clients buying in current year and last year

    Giorge Luiz

      Hi!

       

      My client wants to see the % of clients who bought in current year and also bought in last year.

       

      I achieve this with LOD and parameters, but he want's to see it dynamically in a grid using data on columns.

       

      Here's an example of my calculation:

       

      SUM(

      IF

      {FIXED [Customer ID] : COUNTD(IF YEAR([Order Date]) = 2011 THEN [Order ID] END)} > 0

      AND

      {FIXED [Customer ID] : COUNTD(IF YEAR([Order Date]) = 2012 THEN [Order ID] END)} > 0

      THEN 1

      ELSE 0

      END)

      /

      MAX({COUNTD(IF YEAR([Order Date]) = 2011 THEN [Customer ID] END)})

       

      I think I could use table calculations, but I'm not seeing a way of doing this without parameters.

       

      Can anyone help me?