Can you downgrade your workbook to 2019.2?
1 of 1 people found this helpful
You can artificially create bins as follows:
IF [Age in Years] < 23 THEN '18-22'
ELSEIF [Age in Years] <29 THEN '23-28'
ELSEIF [Age in Years] < 36 THEN '29-35'
Is that what you're looking for?
Before showing you how to do this, I need to note that your swappable tooltip will work in Desktop but not work when published to Tableau Server, Online, or Public. The last time I checked, this only works on Desktop. So, I think we'll need to find an alternative solution for this--one that uses the same chart every time. So I'd suggest creating a single chart like this:
For the groupings, there are a couple of options. You could use Groups to manually group them together, but that won't allow you to account for new ages, so I think the best solution is to use a calculated field. That will take a bit of work to create as it will be a large IF/THEN statement, but it will have the most flexibility.
// Group ages. // I've only added a few ranges here, but you can add more IFELSE's IF [Age Category]="Youth" OR [Age Category]="Toddler" THEN STR([Age in Years]) ELSEIF [Age in Years]<30 THEN "18-29" ELSEIF [Age in Years]<40 THEN "30-39" ELSEIF [Age in Years]<55 THEN "40-54" ELSEIF [Age in Years]<65 THEN "55-64" ELSEIF [Age in Years]<75 THEN "65-74" ELSE "75+" END
Then, on the chart shown above, use this on the columns shelf instead of the actual age:
Then use this sheet in your tooltip. Be sure to specifically filter on "Age Category" as shown below.
TestData.twbx 7.5 MB
Thanks a lot Ken ! Appreciate it. I got it by the detailed explanation you gave.
Thanks Kevin for your help!