Today I got a very unique Client requirement wherein my client wanted to see a list of all the Platform names in the tooltip which are being used by an application. In my current scenario, one application may use more than 20 Platforms and I cannot show list of all Platform names in my dashboard because if I do, I will definitely loose the essence of my dashboard. So , I thought it's better to show 2,3 Platform names on my dashboard and wrapped the rest with ellipsis like Platform A,B,C…. which did solve my problem from design perspective but created another issue for me. As per current Tableau behavior, we cannot show all the names in our Tooltip unless we implement some hack. Let me give you a small overview on Tooltip. These are additional data details that display when you rest the pointer over one or more marks in the view. Special thanks to Jonathan Drummey and Matt Lutton for helping me with this. Hope this helps you guys as well.
For better understanding , I am using the Superstore dataset here which comes along with tableau.
Drag Sub category on your text label. You worksheet will look like the below image .
When you use this sheet in your dashboard , it will look like the below image.
Note : You may use the entire View for this sheet based on your Space availability .
Now when my user hovers over my sub categories, it will show the list of all the names on
my Tooltip instead of single name.Currently, it will show only one name at a time.
Refer the below image
Lets solve this Problem by writing a table calculation . Here , we will use the a Tableau
Function "Previous Value". Before writing the Calculated Field , let me give you an overview
on what this function can actually do.The PREVIOUS_VALUE() function is self-referential
and effectively recursive.The value provided to the function (between the parentheses) just
defines what's returned for the first row of the partition, for the rest of the partition
PREVIOUS_VALUE() returns the value of the entire calculation from the previous row.
But don't get confused with Lookup function . Refer the below Joe Mako's Explanation.
Lookup is based on an expression, so I consider it based on the result of another field, while
Previous is self referring,referring to the result of the calculated field it is a part of. You can
replicate a running sum with previous, for example:
RUNNING_SUM(SUM([Profit])) = PREVIOUS_VALUE(0)+SUM([Profit])
the zero (0) means, then there is no previous value for the result of this calculation, for the
first row in the partition,use 0 as the previous value.
I think I have explained enough ,now lets get back to our problem statement.
Now what you need to do is, first check whether the below mentioned calculated Field is
working as expected or not. Lets add this calculated field on Text Label shelf and compute
using the"Sub Category" or whatever dimension present is on detail shelf / Mark shelf.
But this partially solves my problem. Here, you can see even when we have more than 10 members,
Currently my tooltip is showing only 3 members . Here as you can see in the figure,when
user hovers over Binders, all values prior to "Binders" are getting reflected on the tooltip.
Now what I want if my Client /End user clicks on ellipsis or any of the dimension member ,it
should show all the member names in the Tooltip instead of 1 or 2 . lets wrap our previous
calculated field again inside the "Previous Value along with Lookup function." You will get
the end result.
Add this calculated field in your label shelf and Compute using the "Sub category" as below.
Hurray, we finally get what we are looking for.
Please refer the below KB article for more information.