2 Replies Latest reply on Dec 2, 2016 9:31 AM by Gareth Buckland

    Current Month v Previous Month with AGG calculated field

    Gareth Buckland

      Hello,

       

      I have searched this forum for help on this matter and tried a number of techniques but none are quite what I am after.

       

      The problem I have is that I am trying to compare the current month value against the previous months value based on a user selecting a month via a parameter. I have attached the superstore sample (created in Tableau 10.1) and I would like the Profit Ratio to be displayed side by side twice (Current v Previous) as well as the sum of other measures only reflecting the current month.

       

      I have created a month parameter to determine the current month. Essentially, I think I am looking for a way of displaying the previous months value against the current month. I have attempted a datediff calculation and dateadd but when I use my month filter I lose the previous months value.

       

      Any help greatly appreciated.

       

      Gareth