Is there a way we can add a switch to dashboard that can change what dimension is being summarized?

Is there a way we can add a switch to dashboard that can change what dimension is being summarized?

For example, I have a chart that has the count of customers, summarized by their plan_level (basic, pro, or advanced).
I would like the user to be able to select from a dropdown that allows them to pick from plan_level, plan_length, country, age_category etc.
If they pick plan_length, the chart will change to show plan_length (monthly or yearly)

I have looked at adding a parameter via SQL but it only seems to work as a filter within a dimension, not as a way to change your dimension.

so, instead of this (the example in the parameter help page):
select count() from people where state = {{State}}
It would be more like this:
select {{state}}, count(
) from people group by {{state}} --- and i could change state to source with dropdown

This sounds similar to this feature request. If that sounds right please feel free to upvote it and add any context you feel would be valuable!

Parameterized date granularity is on the roadmap, though, and is expected in one of the next few major releases: Metabase Product Roadmap

Hey Carlin,
Yes you can do it by using a case when statement.

Check the syntax below.

select case when {{dropdown}}='plan_level' then plan_level
when {{dropdown}}='plan_length' then plan_length
else null end as dropdown_selected
, count(* ) from people
group by dropdown_selected

Hope it is helpful.

I requested a feature a while called "Alternate Dimensions" which is what Qlik does. Meaning you could just swap out a dimension on a chart interactively .