8 Replies Latest reply on Jul 27, 2016 2:22 AM by Simon Runc

    Good evening all! I have been trying to add a dynamic comment in a tooltip.

    Panagiotis Sideris

      I am using 2 dimensions Region and service to calculate sumof values for 3 measures: Cost, Profit and Sales.

      In my tooltip i have added Region and Service and in the end the sum of the selected measure.

      What i am trying to achieve is to insert a dynamic text, in the end. For example if i hover over in 60,000 Profit I would like to have the "profit description" in my tooltip.

      if  hover over in the 750.000 Sales (last line) i would like to have the "sales description in my tooltip" etc.

      This is a customer inquiry, aiming to provide additional information to server users.

      thank you all in advance!!

       

       

       

       

      I ScreenShot.PNG

        • 1. Re: Good evening all! I have been trying to add a dynamic comment in a tooltip.
          Simon Runc

          Evening!!

           

          So it should have added it already, but if you'd 'manually' edited you tool-tips it might not have....if you choose measure name from the insert menu, this will be dynamic to the measure being hovered over

           

           

          also if you don't like the measures description (and don't want to actually rename the field), you can also use the alias which is what would get referenced in the measure name(s), when shown on a tool-tip, header...etc.

          2 of 2 people found this helpful
          • 2. Re: Good evening all! I have been trying to add a dynamic comment in a tooltip.
            Panagiotis Sideris

            Dear Simon, i Do appreciate your quick response... I have tried your proposal, although i am not able to achieve the result i want.

            maybe there is something i am doing wrong?

            concerning the measure names this is working fine, but unfortunatelly that only returns the value and the name of the measure.

            I am actually looking to dynamically include a description of my measure.

            in case i use aliases the label changes as well as the toolitp (its like we have renamed the field).

            Maybe this can be used as an alternative.

            Ideally i would like to keep the measure names as is, and include a desctiption withing the tooltip to decribe my fields. (Please see "New Tooltip" below.

            Once again i do appreciate your help.

            • 3. Re: Good evening all! I have been trying to add a dynamic comment in a tooltip.
              Carl Slifer

              Howdy,

               

              This will prove difficult if not impossible. In this case it would be better to  create an information sheet and put that on the dashboard as well. If this was something about each service you could add it. Such that you defined each service. This is because service A and B are mutually exclusive, you could write a case statement that returned a given string for each one. But sales, profit and cost new are currently not mutually exclusive.  You could possibly get them that way by using a pivot but it would be like fixing a squeaky door by removing it from its hinges. You're left with bigger problems.

               

              The information sheet would be a tiny ' i ' in an inconspicuous position on the page. It would contain the data dictionary so to speak and it would also be a tool tip with free form text where you can define all your measures and dimensions as needed. The user if unsure could hover over and learn what each item meant.

               

              Best Regards,

              Carl Slifer

              InterWorks

              2 of 2 people found this helpful
              • 4. Re: Good evening all! I have been trying to add a dynamic comment in a tooltip.
                Simon Runc

                Carl is quite right...the only way I can think of doing this is to reshape your data (so Measure Name goes down the page) and then it would be a 'real' dimension and you could create the tooltip text dynamically

                 

                [ToolTip Text]

                IF [Measure Name Real] = 'Profit' THEN 'Profit is defined as....'

                ELSEIF [Measure Name Real] = 'Sales' THEN 'Sales is defined as...'

                ....

                END

                 

                but would be a lot of work for not much gain. We use these hover-over help (as Carl suggests) all the time, and work really well

                 

                 

                We can get a lot of information in there, with a no impact to the clarity of the Viz (or using up screen space)

                1 of 1 people found this helpful
                • 5. Re: Good evening all! I have been trying to add a dynamic comment in a tooltip.
                  Panagiotis Sideris

                  Dear Simon once again thanks for your support.

                  I would like to ask for some additional clarifications cocnerning your last proposal. It sounds very interesting.

                  Would it be possible to have a sample worksheet to understand how it actually works?

                  thank you in advance.

                  • 6. Re: Good evening all! I have been trying to add a dynamic comment in a tooltip.
                    Simon Runc

                    So the best way I've found to do this is as follows

                     

                    I bring MIN(1) onto the Columns and Row Shelf...and set the Axis Range to be between 1 & 1 (for both)...I then hide the headers for the Axis, and remove any Grid-lines, Zero-Lines, and Pane Dividers from the format menu

                     

                     

                    I then use a custom shape (the question mark), which I got from Free vector icons - SVG, PSD, PNG, EPS & Icon Font - Thousands of free icons (really good site for icons, btw!)...I can then edit the ToolTip for my text

                     

                     

                    I then bring this into the Top Corner of my Dashboard, and when the user hovers over the toolTip acts like a hover-over help.

                     

                    Attached is an example.

                     

                    Hope this makes sense, but let me know if any aspect doesn't

                    1 of 1 people found this helpful
                    • 7. Re: Good evening all! I have been trying to add a dynamic comment in a tooltip.
                      Panagiotis Sideris

                      Hi Simon, this was a really good idea.... Thanks for that.

                      Would you be able to provide some additional clarifications for your other proposal also?

                      Maybe an example also?

                      Thank you in advance.

                      Best Regards,

                       

                       

                      [ToolTip Text]

                      IF [Measure Name Real] = 'Profit' THEN 'Profit is defined as....'

                      ELSEIF [Measure Name Real] = 'Sales' THEN 'Sales is defined as...'

                      ....

                      END

                      • 8. Re: Good evening all! I have been trying to add a dynamic comment in a tooltip.
                        Simon Runc

                        So in this example I have used the Pivot function so my measures go down the page (and act as a real dimension)...this could also be done with a SQL View, Custom SQL, or just as part of any ETL process

                         

                         

                        I then rename my new pivoted columns

                         

                        Once I have it like this my Measure Name REAL is now a proper dimension so I can access it in my formula

                         

                         

                        I can then add this to my tooltip.

                         

                        This isn't without it's issues...such as all the measure values are formatted the same way (as they are a single measure, in Tableau's eyes). This can be got around with some of the string functions (I'v e given an example here of adding a £ in front of Profit and Sales, but not Quantity and Discount)...and also the Aggregation is the same (all are SUM, for example)....again this can be got around by using an IF formula where the aggregation is defined in there

                         

                        [Measure Value to Use - AGG]

                        IF [Measure Name Real] = 'Profit' THEN SUM([Profit])

                        ELSEIF [Measure Name Real] = 'Sales' THEN SUM([Sales])

                        ...

                        ELSEIF [Measure Name Real] = 'Discount' THEN AVG([Discount])

                        END

                         

                        This 'shape' of data is very useful for doing certain things, but makes others harder....If I use this technique (known as data scaffolding) I tend to have 2 datasources, 1 like this, and another how it was originally. I can then use the appropriate data-source for any Viz...and can use Action Filters to send actions between the 2 (and as of Tableau 10 we can also use quick-filters across data-sources!!)