10 Replies Latest reply on May 1, 2018 6:36 PM by Shinichiro Murakami

    Display Previous Month Value on Filtered Date

    Bill W

      Afternoon Tableau Friends,

       

      I am trying to show the previous month value on a filter date within my dataset. My dataset is currently two months behind.

       

      I've figured out how to show the max value per the selected/filtered month by this calc:

      if

      {Include : max([Operation Date])} = [Operation Date]

      then

      [Value]

      END

       

      However, I can't figure out how to do it for the previous month.

      Attended this calc:

      if

      {Include : max([Operation Date])} = datepart('month',dateadd('month',-1,[Operation Date]))

      then

      [Value]

      END

       

      No Dice.

       

      Looking for

       

      For example, if someone filtered on Feb, 2018 - it would show Jan, 18 data (13,246)....November, 2017 - it would show Oct.,17 data (1,267).

       

      Thanks for any ideas or assistance.