3 Replies Latest reply on Jul 18, 2018 5:58 PM by Shinichiro Murakami

    vlookup alternative in Tableau


      Hi all,


      I've attached a copy of the workbook for your consideration.


      Basically I've created a column to give each month a value with a baseline of today() i.e. 07/2018 = 0, 06/2018 = 1, 05/2018 = 2 ... etc


      This helps me to identify historic periods. Now I need to compare the [Contract Magin Forecast  at Comp] measure for a specific project between periods 1 and 2. In my attempt I used the following:


      IF [Date - Months Diff] = 1 then [Contract Magin Forecast  at Comp] end

      IF [Date - Months Diff] = 2 then [Contract Magin Forecast  at Comp] end


      The strange thing is that in some cases it works, in the attached image you can see I've highlighted project 13 is correct however others aren't.


      Any help will be appreciated.