2 Replies Latest reply: Feb 13, 2018 10:14 AM by Bill Markham RSS

    Count Distinct for A Kpi

    Aaron Dhobi

      Hi Guys

       

      Need your help if you can:

      I am struggling with a measure I am trying to create.


      In order to count the number of customers who are within their ordering frequency I have use the following:


      if(Aggr(max([Last Order Date]),

      [CustNo/CustName])+ sum(CustomerDays)/sum(OrderCounter)>today(),

      count(distinct(SECURED_CustomerContactKey)),0)


      “Aggr(max([Last Order Date]),[No/Name])+ sum(CustomerDays)/sum(OrderCounter)” uses the “Last Order Date” to establish when the customers are next due to order.


      This works fine within a table visual however I would like to display the count as a KPI visual so the If statement does not work.


       

      What is the best way for me to achieve this count?


      Thanks