4 Replies Latest reply on Sep 13, 2013 4:25 AM by Steven Blanc

    Sales vs Sales Target based on Previous Year Sales

    Steven Blanc

      Good morning,


      I am looking for a little help here.


      I have two calculated fields based on Sales the first is [Sales (2013)] and the second is [Target (2013)]. These two fields are calculated as follows:


      Sales (2013)


          YEAR([Document Date])=2013




      Note: I know that I can simply use Document Date to break up my sales by month and year, but this has caused me layout problems. This problem remains regardless of the method of displaying my sales figures.


      Target (2013)


          YEAR([Document Date])=2012


          (1+[Target Percentage])*[Sales]



      I would like to work out the difference between these two figures using [Target (2013)] - [Sales (2013)].


      I am assuming that my issue is that Tableau cannot compute a single calculation with multiple document dates. I effectively get all null figures.I tried creating a [Target Date] calculated field which was equal to [Document Date] + 365 but realised that has the same fundamental flaw. Any idea how might I get around this issue?