6 Replies Latest reply on Oct 21, 2018 8:15 PM by Shinichiro Murakami

    How to calculate rolling month for last 12 months?

    Adam Aliz

      Hi Tableaurs,

       

      Please help for the below query:

       

      I want to show last 12 months rolling value in the bar chart form. For instance : If i click the month of April 2018 in the bar chart

       

      it should give me the output of total value from May 2017 to April 2018 ,. It should show the total sum of sales from May 2017 to April 2018 divided by distinct customer_id for this period only.

      Likewise , if i click month of May 2018 in the bar chart it should show the total value from June 2017 to May 2018.  it should show the total sum of sales from June 2017 to May 2018 divided by distinct customer_id for this period

      and so on until the data available..

       

      Logic should be like this : SUM(Sales) / Unique (Customer_Id)

       

      Attached is the sample workbook for your reference. Kindly help. thankyou