Dynamic Axis, Parameters and Bar Chart

I have a dataset with 3 columns, Age_bucket (which has string values like 20-25, 25-30,30-35), tenure_bucket(which also has string values like 0-4, 5-10, 10-15 etc), and total_sales column .
I want to dynamically switch the way the bar chart will display the data based on dimensions i.e. Age_bucket and tenure_bucket based on a selection inside a filter/parameter.

I want to create a paramater named as “View data by”, with values like Age and Tenure.

When the value in the parameter is ‘Age’, I want the bar chart to show total sales by Age_bucket (Age_bucket categories on x-axis and total sales as a value),

But if the value in the parameter is ‘Tenure’, I want the bar chart to show total sales on the basis of tenure_bucket (tenure_bucket categories on x-axis and total sales as a value).

Please tell me how to do it with complete explanation of parameter creation, calculated fields creation and linking the parameter with the bar chart.

Hi @tyagivmic221
if you understood you right you should have a look at.
https://democentral.learnquicksight.online/#Dashboard-TipsAndTricks-Interactivity-Dynamic-Dimensions-and-Measures
BR

Hi @tyagivmic221
could you solve your issue?
BR