1 Reply Latest reply on Dec 15, 2016 3:21 PM by Ivan Young

    Formula to "re-label" year

    Jake Child

      I am a fairly new tableau user, so please correct me if there is a better/more efficient way to pose this question. I will try to be thorough!

       

      I am creating a dashboard with a simple line graph that amount (vertical axis) and month (horizontal axis) with lines displaying different years. The graph displays the amount gifted to this organization. Our head controller has a "plan" or "goal" that he would like displayed on the graph as well but isn't real data. The only well that I thought to do this was to create dummy data for each month in the year 1900. I now have the line being displayed on the graph but it is labeled as year 1900. Can I write a formula that changes the label 1900 to "Plan" or "Goal"? Here is what I'm currently seeing. (Ignore the fact that the numbers are way off).

       

      Any advise you can offer would be helpful!

       

      Thank you!

       

      Year to Date.PNG

        • 1. Re: Formula to "re-label" year
          Ivan Young

          Hi Jake,

          In general it's a best practice to provide a packaged workbook or some sample data.  This will increase the chances of getting help, particularly if related to some aggregation or data relationship.  In your case I think the question is pretty simple and the screenshot and your description should be enough.

           

          Try, If YEAR([Accounting date]) = 1900 THEN 'PLAN' ELSE STR(YEAR([Accounting Date])) END.  Use this on colors and as your filter.

           

          Regards,

          Ivan