2 Replies Latest reply on Jun 20, 2012 6:16 AM by Kyle Kim

    How to include values by year in map pop-up

    Kyle Kim

      I have oil production numbers by year and country that I've set on a map but I can't figure out how to include the figures by year on a map. Is there a way to visually show on the level of detail box?. I'm guessing it has something to do with the Measures types but I cant figure out which one it is.

        • 1. Re: How to include values by year in map pop-up
          Alex Kerin

          1. You want to drag year up to dimensions to stop Tableau trying to sum it.

          2. Interesting problem as you are trying to access multiple rows from a single aggregate. It's similar to this solution from Andy Cotgreave : http://www.thedatastudio.co.uk/blog/the-data-studio-blog/andy-cotgreave/the-joy-of-six-calculated-fields but you don't have a year view in there and making it available would mess up your chart

          3. Instead you could make 5 or so new calculations like this: If [Year]=2009 then ([Production of Crude Oil, NGPL and other liquids (thousand barrel]) end and add these to the level of detail. Now they are available in your tooltip.

          1 of 1 people found this helpful
          • 2. Re: How to include values by year in map pop-up
            Kyle Kim

            Hi Alex,

             

            I can't seem to write the correct markup for the solution you mentioned in No. 3.

             

            Here is the original tooltip:

            Region: <Region>

            Country: <Country>

            Production of Crude Oil, NGPL and other liquids (1,000 barrels per day): <SUM(Production of Crude Oil, NGPL and other liquids (1,000 barrels per day))>

            Year: <SUM(Year)>

             

            I want the modified tooltip to replace the year and production lines. I just threw up the command below in the Edit Tooltip box:

             

            <Year>: <Production of Crude Oil, NGPL and other liquids (1,000 barrels per day)>

             

            I tried copy and pasting what you wrote but it didn't seem to pick up the IF, THEN function (it just showed as text in the preview function). Not sure how I need to mark it so it reads it as a function and not text? (Updated workbook attached to original post).

             

            Also, I noticed when I changed the Year measure from SUM to Dimension, the circles of the countries inherited a slightly darker border as well as losing the 80% transparency I set. I know I can lower the transparency further to resolve the issue, but I would like to know why it does this.