14 Replies Latest reply: Mar 10, 2014 2:28 PM by Tomasz Zagdan RSS

    Count total distinct problem

      Hi

       

      i'm trying to create a chart that shows to how many stores each product is sold.

       

      X axis should show "Time" dimension (days / weeks / months) and Y axis should show two expressions:

      - Total number of stores to which each product has been sold at least once in a period - for that I'm using function "count(distinct(StoreID))"  which works ok

      - What % of the total store base that product was sold to. I was trying with the function below but it doesn't seem to work. Any suggestions?

       

      count(distinct(StoreID))
      /
      count( total distinct (<Time> StoreID
      ))

       

      Many thanks