Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in BI by (17.6k points)

I am very new to Tableau, and I am trying to create a Scatterplot which can be viewed at different levels within the Hierarchy on the same Dashboard. For example, suppose I have employee counts, company counts, and population density and I have this information by city, and these cities are in certain states.

I would like to be able to view the ratio # Employees/# Companies along the x-axis, population density along the y-axis, and I would like the ability to have each city shown as a separate bubble, and be able to, say, filter on Maryland, and show only the cities within for Maryland. This is all very straightforward using two quick filters.

I'd also like to be able to somehow allow the user to specify that they want to see the bubbles at the State level, and once they select that option, it no longer shows the bubbles by city, it has aggregated those bubbles and is showing them by State. How do I do this?

Thanks!

1 Answer

0 votes
by (47.2k points)
  • When you are editing the view (just drag the field to detail and use the collapse option), but not so easy to provide this option to users.

  • There is an alternative, Create a parameter named [Level]. Make it a list of values, like 'City' and 'State'.

  • Now create a calculated field [Level of detail]:

CASE [Level] WHEN 'City' THEN [City] WHEN 'State' THEN [State] END

  • Let's assume your city and state fields are named [City] and [State].

  • You can drag this [Level of detail] field to details, and let the user choose the parameter. When he chooses 'State', it should aggregate on State level. Same for City.

Related questions

0 votes
1 answer
asked Apr 8, 2020 in BI by Anup (1.6k points)
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.2k users

Browse Categories

...