4 Replies Latest reply on Jan 29, 2018 7:40 AM by Mark Lowrie

    Display only last 3 month where data is available

    Benoit Pigeon


      I'm trying to display on a workbook the three last month of sales.

      I have seen how to do it on http://community.tableau.com/thread/121547 both by parameter and basic filters but I would need to display the last three month where we have some data (data are not updated everymonth)


      I wrote this formula but I get and error because of aggregate and non aggregate data.

      IF [Dates]<=MAX([Dates])   AND [Dates]>=DATEADD('month',-6,MAX([Dates]) ) THEN 'true' else 'false' END


      It works if I use

      IF [Dates]<=TODAY()   AND [Dates]>=DATEADD('month',-6,TODAY() ) THEN 'true' else 'false' END


      But in that case I don't have the last three month where I have some data.

      Any idea ?

      Thanks a lot