9 Replies Latest reply on Feb 2, 2012 10:40 PM by haroldgraycar

# Help with Caption please

I'm using a frequency distribution like:

 Shoe size Count of Sample % of Total 6 8 1% 7 22 3% 8 77 11% 9 169 24% 10 201 29% 11 145 21% 12 64 9% 13 14 2% Grand Total 700 100%

I would like to put in a Caption something like:

The most frequent shoe size is 10.

The frequency is 29%

Appreciate help in how to do the calculations for the Caption.

Thank you.

• ###### 1. Re: Help with Caption please

The answer depends on how your data is structured. If it looks like your sample, i.e. it is already aggregated, then see attached workbook for a solution (two table calculations on Level of detail shelf. If you data needs to be aggregated in Tableau, then can you provide a sample?

The  trick is in the partitioning of the table calculations.

I have to warn you that table calcs are not an easy concept to grasp, and I am sure there could be a better way, or other ways, of doing this via table calcs.

• ###### 2. Re: Help with Caption please

Thanks Dimitri,

Firstly, you are correct, this is already aggregated from 700 samples that look like this:

 Sample shoe size 1 11 2 9 3 11 4 9 5 9 6 11 7 10 8 10 9 13 10 8

etc.

I have set it up like this:

It's in the 'Table' tab of the attached.

Unfortunately, I'm using Tableau Public, so I can't seem to see your workbook.

When I try to open it I get the message:

Could I please prevail on you to publish it to Tableau public?

The link to this work is:

Thanks,

Harold

• ###### 3. Re: Help with Caption please

It is a packaged workbook, you should be able to open it with Tab Pub, but it is v7, so you need v7 too.

I can upload it to public tomorrow, when back at work.

Sent from my iPhone

• ###### 4. Re: Help with Caption please

Thanks Dimitri,

I have Tab Pub V7, and just tried again with the twbx from my desktop, but it wouldn't open & gave the same error as above.

Thx for your assistance so far.

• ###### 5. Re: Help with Caption please

Dimitri, I'd never published anything to Public and wanted to see how that process worked so I took your file and published it here:

http://public.tableausoftware.com/workbooks/mostfrequentvalue

Not sure if this worked correctly or not.

--Shawn

1 of 1 people found this helpful
• ###### 6. Re: Help with Caption please

Thank you, Shawn

I hope it works

Sent from my iPhone

• ###### 7. Re: Help with Caption please

Thanks Shawn & Dimitri,

The Caption works exactly as required for the summary data.

Would it work for the individual data (700 rows) as well in my own model?

http://public.tableausoftware.com/views/Distribution_0/Table?:embed=y

As a newbie to Tableau, not sure if you can extract all the original data from the above.

Thx

Harold

• ###### 8. Re: Help with Caption please

Harold,

the same approach still works for this data, with minor changes.

Also, you cannot have Totals on the same sheet, because they confuse the formulae, but this can be rectified with additional tweaking.

I also put a quick filter on the sheet to demonstrate that both numbers are calculated dynamically - exclude size 10 and see the numbers change.

1 of 1 people found this helpful
• ###### 9. Re: Help with Caption please

Appreciate your help Dimitri,

That's what I was after.

I have a whole lifetime of Excel methods to erase from my memory, so I've learnt a lot from you on this one.

Thx

Harold