6 Replies Latest reply on Feb 3, 2017 2:08 PM by Shinichiro Murakami

# Multiple values in one column

This may be just a mind blank on my part, but I'm attempting to make a worksheet in which I include a measure in my tooltip - however, for one value in one column there are multiple values in another column, and I'd like the tooltip to represent this as a list. In the sample workbook I've attached, I could theoretically make a list of dummy variables, however in my actual workbook I have far too many values to make a dummy variable for each. The last 2 tabs in my workbook have an example of what I'm trying to achieve. Is this possible, and if so is there some sort of calculation I'm missing or is it really just a mind blank on my part?

For reference, I'm using Tableau version 10.1.

• ###### 1. Re: Multiple values in one column

Hi Emilie

Actually, it's quite difficult technically to achieve what you want (Not impossible)

Looks like easy simple chart from a glance, but back ground calc and table setting is following complexity.

[Text Topping]

previous_value("")+(if first()=0 or lookup(min([Topping]),-1)=lookup(min([Topping]),0) then str(lookup(min([Person]),0))+", " else "" end)

[Index Filter]

last()=0

[Number of records 2]

window_sum(sum([Number of Records]))

Similar setting for person side.

This is much much easier approach without any calculation / table calculations.

Thanks,

Shin

2 of 2 people found this helpful
• ###### 2. Re: Multiple values in one column

This is awesome, Shin. Thank you!

• ###### 3. Re: Multiple values in one column

Emilie,

You can use table calculations to build a list of relevant names. Sample solution workbook attached (version 10.1.4).

Here's what I did:

1. Bring [Person] onto the Columns shelf, to the left of SUM(Number of Records).

2. Change SUM(Number of Records) to be a Running Total over Table (Across).

3. Create a calculated field [Last column] to use as a filter. Configure it to compute along [Person].

4. Add [Last column] to the filters shelf, and filter on True.

5. At this point, your view should identical to how it originally did. But now it is constructed in a way that will allow us to leverage table calculations to compile the list of names for each row.

# Now for the magic…

6. Create a calculated field [Append Names], which will use PREVIOUS_VALUE to compile the list of names, one at a time, from the columns in the view. Configure this field to compute along [Person].

7. Add [Append Names] to the Marks shelf as a Tooltip element, and update your tooltip text to use it.

8. Voila!

1 of 1 people found this helpful
• ###### 4. Re: Multiple values in one column

Ah, Shin beat me to it. Well done, Shin.

• ###### 5. Re: Multiple values in one column

No worries, it's interesting to see how you both solved it! Great minds think alike Thanks!

• ###### 6. Re: Multiple values in one column

Sorry,

That sometimes happens

Shin