1 Reply Latest reply on Jul 13, 2018 4:50 PM by Hari Ankem

    How to write calculation to extract newest rolling 6 weeks data from Tableau

    Helen Wang

      Hi Everyone,

       

      I need to extract newest rolling 6 weeks data from Tableau.

      Anyone can provide me some advice on the formula?

       

       

      I have used this to extract the newest quarter to date data.....

       

       

      IF [Fiscal Quarter]<={MAX([Fiscal Quarter])}

       

       

      THEN [Sell Thru Dollars]

       

       

      END

       

       

      ------------------------------------------------------------------------------------------------------

      IF [Fiscal Week#(Quarter)]<={MAX(Fiscal Week#(Quarter)])} ( I don't know how to edit this part to be the sum of the most recent 6 weeks)

       

       

      THEN [Sell Thru Dollars]

       

       

      END

       

      ----------------------------------------------------------------------------------------------------------

       

      All my week measures look like this: