8 Replies Latest reply on Oct 14, 2016 11:33 AM by Francesca Cristoforetti

    Calculate percent of total when using a measure defined as WINDOW_SUM

    Francesca Cristoforetti

      Hi all,

      I have defined a calculated field as:

       

      WINDOW_SUM(

          COUNTD(

              IF [date]={FIXED [customer_id] : MIN([date])}

                  THEN [customer_id]

              END),FIRST(),0)

       

      I also have defined another calculated field ([Customer Bands]) wich define three categories of customers.

       

      I have a simple woorksheet showing month of date and the running count of distinct customer for each Customer Band and the total, please see the attached screenshot

       

      I would like to calculate, for each month the percent of total for each customer band. it seems to be a simple things but I don't know how to do it.

       

      Any suggestion or idea?

       

      Thanks