5 Replies Latest reply on Nov 22, 2016 11:00 AM by Matthew Risley

    Rolling 6 Months

    Matthew Risley

      Hey Tableau Family! I need your help!

       

      Attached is a workbook with everything you need. If you need more or a better explanation of the requirement, please ask

       

      I am trying to calculate a score that is %Good Guys - %Bad Guys. However, my new requirement is to have a 6 month rolling calculation for it.

       

      For example, A user wants to see the score for October. So the score should work as follows: Add up all the Good guys, Bad guys, and Number of Records for the months of October, September, August, July, June, and May and calculate the score.

      I am currently solving this with a Window_SUM calculation (Window Sum Rolling Score in the workbook):

       

      WINDOW_SUM(SUM([Good Guy]),-5,0)/WINDOW_SUM(sum([Number of Records])-SUM([Unsure of Guy]),-5,0) - WINDOW_SUM(SUM([Bad Guy]),-5,0)/WINDOW_SUM(sum([Number of Records])-SUM([Unsure of Guy]),-5,0)

       

      This calculation works great if you have the data in a table format. But if I want to see October 2016 vs October 2015 it will not work because it's using Window_SUM.

       

      Instead of using Window_SUM, how should i go about this?