r/tableau • u/Middle_Row_3396 • 3h ago
can a bar chart switch which field it groups by based on a parameter?
im putting together a dashboard thats meant to be shared across three different teams, lets call them team a, team b, and team c. they all track the same overall goals, like total sales, so it makes sense to keep everyone looking at one central view instead of building out separate dashboards for each group. the tricky part is that each team slices those numbers using different fields. right now i have a bar chart showing sales by state, and its hooked up to a parameter so people can toggle between team a, team b, and team c.
what im trying to figure out is if theres a clean way to make the bar chart swap the grouping field automatically when someone changes that parameter. for example, if the user picks team a, the bars would group by state. if they switch to team b, the bars group by country instead, which is the change id show in a two-state mockup (maybe dreamina motion studio).
i really want to avoid duplicating the whole view three times if i dont have to, since keeping one chart updated is way easier in the long run. has anyone set something like this up before in tableau, and whats the best way to wire up the parameter so the dimension changes on the fly?
