1 Reply Latest reply on Jun 27, 2018 11:32 AM by Jim Dehner

    Calculate Annualized on the Fly

    erik anderson

      I am comparing historical annual data to current year. For past years, we have Q1-Q4. For current, we have Q1 (and almost have Q2). I would like to annualize the current year data for the date range currently selected. In other words, if last year we had 10, but this year, we had 2 during Q1 and are not displaying Q2 data (since it is incomplete), I would multiple 2x4 and show 8 for current year and 10 for prior year.

       

      Historically, we have done this in Excel with a value typed in one cell and then applied that cell to all calculations. How can I accomplish this in Tableau? Can I create a variable for data entry and then reference that in my calculations? Or, how would I determine the last qtr being displayed for the year, and then automatically calculate?

       

      Thanks for the ideas.

        • 1. Re: Calculate Annualized on the Fly
          Jim Dehner

          You have asked several question

           

          "Can I create a variable for data entry and then reference that in my calculations? 

          Yes use a parameter - then create a calculation sum(value)*[Enter Last Quarter Completed]

          Next

           

          how would I determine the last qtr being displayed for the year, and then automatically calculate?

           

          this will find the last quarter in the view

          then you can use it in a case statement to get your multiplication value and drop that in your formula (s)

           

           

           

           

           

          it would  return something like this

           

          Jim

          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.