3 Replies Latest reply on May 16, 2017 8:24 AM by Arthur Figueiredo

    How to calculate one day last month and last year?

    Arthur Figueiredo

      Hello everyone.

       

      I'm new in Tableau and I'm starting to develope some dashboards. I'm creating a workbook with informations from yesterday, one week ago, onde month ago and one year ago. The problem is that I need just one day , not the holl moth or year.

       

      Example:

      - for yesterday, I'm using a calculated field = today ()-1

      - for one week ago = today ()-8

       

      Problem:

      - for the month, I'm using = today ()-31 ... the problem is that some months have 30 or 31 days, so the formula will not show "yesterday last month"

      - the same problem for the year, that I'm using = today ()-366 ... trying to find "yesterday last year"

       

      Could anyone help find a way to calculate "yesterday last month" and "yesterday last year"?

       

      If I was not clear, let me know.

       

      Best Regards.

       

      Arthur.