4 Replies Latest reply on Aug 15, 2018 4:23 AM by Andreas Nilsen

    Show latest value within a given year

    Andreas Nilsen

      Hi all,

       

      I have some data with regions and projects together with dates. I'm trying to create a calculation (and table) that returns the latest value within a given year for the projects and regions. The year is a parameter in the original Tableau file, so when I pick for example 2017, the latest value should be 97.3% for Proj1 (which is 2017-10-01, Q4), and if I pick year 2018 it should be 97% for Proj1 (2018-04-01, Q2). And the latest regional values (Reg1, Reg2, Reg3 etc.) in the given year would be an average of all the project values that belong to the regions.

       

      Does anybody know how to do this? I tried several approches, for example level of detail calculations, FIXED, LAST(), MAX etc.

       

      The data looks like this, I also attached the packaged workbook in the message (without any calculations from the orignal file since they didn't work anyway).

          

      RegionProjectPeriodValue
      Reg1Proj12017-01-01100,00%
      Reg1Proj12017-04-0196,60%
      Reg1Proj12017-07-0196,30%
      Reg1Proj12017-10-0197,30%
      Reg1Proj12018-01-0197,40%
      Reg1Proj12018-04-0197,00%
      Reg3Proj72017-10-0197,80%
      Reg3Proj72018-01-0196,90%
      Reg3Proj72018-04-0197,60%

       

      Using Tableau 10.4.

       

      Thanks in advance!

      BR

      Andreas