1 Reply Latest reply on Oct 8, 2016 6:25 PM by Jonathan Drummey

    How to create annotation with calculated field linked to page (per year)

    Rob Oudehand



      I'm working on a visual regarding number of malaria deaths per country per year.


      Currently I have a visual with Year on the page. When I run the animation, I would like to see the total number of Deaths for that year in a free floating annotation.


      Can someone help me on how I can link the total deaths of all countries to the year that the page in on at that time? Attached on sheet 3 is what I am aiming to do.


      Thanks for any help given!



        • 1. Re: How to create annotation with calculated field linked to page (per year)
          Jonathan Drummey

          Hi Rob,


          The Pages shelf is processed very late in Tableau's pipeline so we don't have any calculated fields that can access it, and the way Tableau builds out its titles those are before the Pages Shelf "slices" the data into pages so that doesn't work either.


          The best solution I've found for cases like this is to put multiple worksheets on a dashboard and have the same field(s) on the Pages shelf for each worksheet with Pages turned on for each, like this:


          dashboard jtd.png


          I also played around with the formatting of the bars, I used a rank calculation to position the bars so they would properly sort in each year and a Gantt bar mark to get the labels below the bars (with an mostly invisible 'l' to get some spacing), and a couple of floating white text objects to hide the large legend. On the title I also added in a calculation for the # of countries with non-Null reported # of cases because that significantly changes over the years. For example Zambia doesn't have any reported cases in the first year of the data and they have several thousand deaths per year. (I'm volunteering on a Tableau Foundation project to eliminate malaria there, see Visualize No Malaria | A partnership with PATH, the Tableau Foundation, and you to make malaria history for more details.



          1 of 1 people found this helpful