1 Reply Latest reply on Mar 2, 2016 10:51 AM by Steve Mayer

    Use last month value for Year rollup

    Bryan Duffy


      Apologies if this has been asked before but I cannot find an answer on the forums. I'd imagine this is quite an easy thing to do but I'm very new to Tableau and haven't figured it out.


      I have a column that is the value of an item. I have monthly figures for the value and it works fine when my chart is segmented by months. However, when I roll up to the year, I need to use the December figure as the year figure (and if we are mid year, then the latest month's figure).

      Can someone please advise as to the easiest way to do this?



        • 1. Re: Use last month value for Year rollup
          Steve Mayer

          Posting a packaged workbook will always get more responses here, but if I understand your description right, you can use a simple table calculation to only show the latest month.


          For your yearly rollup, keep your month field in the Rows or Columns, so that you are still displaying all months of the year. Then create a calculated field called "Last" with the following formula:


          LAST() = 0


          This will return True only for the last row in your table calculation.


          Add this calculated field to filters & set it to True. Make sure addressing is set to your month field, and you should only see that month now.


          Then uncheck "Show Header" by clicking the little down arrow on your month field, so that you aren't displaying the month anymore (you can also format the month to show just the year ("yyyy") if you want to display the year.


          Hope this helps - if not, please post a workbook.