0 Replies Latest reply on Jan 24, 2017 12:37 PM by Ty Stackhouse

    Day, Month and Year

    Ty Stackhouse

      I am trying to duplicate a similar format that I have created in Excel to Tableau. I can not bring the information in from excel on my actual work sheet, so the Excel example is for formatting purposes only.

      I would like to see the current sales, previous period sales, the percent change (between the current and previous),and the direction arrow for day, month and year in a table.

      I am trying to find current YTD  compared to Previous YTD, current MTD compared to Previous MTD and  Yesterday compared to Two days Ago.

      Below is the formula I have previously used to calculate PYTD and have used similar ones to find PMTD and Two Days Ago...

       

      IF Year([Sale Date])=YEAR(TODAY())-1 AND Month([Sale Date])<= MONTH(today())

      AND DAY([Sale Date])<=DAY(TODAY()) THEN [Sales] END

       

      For all of these I was able to use calculated fields to calculate all of them individually. However, I am unable to find a way to make the desired formatting work.

      I have attached a blank workbook with sample data.

      Any help/suggestions would are appreciated

      Thanks