8 Replies Latest reply on May 8, 2016 9:30 AM by Mahfooj Khan

    Can I do calculations in the tooltips text box?

    Bingcan Chen

      Hi all,

       

      What I wanted to do seems really simple. But I am having a hard time accomplish it in Tableau. For illustrative purpose, let's say I have a file with only 1 row of data. It only has four columns as the following:

         

      Course NameMaleFemaleTotal
      Tableau 101203050

       

      Now, I created a very simple bar chart by using Measure Name and Measure Value (Male and Female) to show how many students that I have in each gender. When I hover over to each bar, I am able to see the raw number of students. But besides that, I always wanted to show percentages (40% male, 60% female). How could I edit the tooltips to do this? (when hover over to the male bar, it will show 20 and 40%)

       

      I was trying to do [Measure Value]/[Total] in the tooltips edit window, but it showed the formula in a text way (20/50) instead of the result of the calculation. I also thought about using calculated field, but it seems like [Measure Value] can not be used in the calculated field.

       

      I know I can go back to the source file and transpose the data outside of Tableau, but is there any way that I could accomplish this in Tableau??

       

      Thanks,

       

      Bingcan