21. Dynamic Charts: Field Parameters, What-if and Dynamic Top N
21.2 Field Parameters: Switch Dimensions (Dynamic Axis)
Quick answer: the short, self-contained version of this lesson is the guide Power BI Field Parameters.
Start with a problem
The same chart should switch its axis between City, Platform and Category.
Explain simply
A field parameter can contain columns too. Put it on the axis and the slicer chooses the grouping.
Show the data
| Group by | Values (₹) |
|---|---|
| City | Pune 850, Nashik 800, Kolhapur 450 |
| Platform | Blinkit 1,100, Amazon Now 1,000 |
| Category | Dairy 1,050, Snacks 650, Fruits 400 |
About this data: This table uses columns: Group by, Values (₹). This table uses columns: Slicer, Bars. This table uses columns: Wrong result, Reason, Correction. Values shown are the lesson examples already on this page (not a new dataset).
Fictional sample data. Practice file: visuals_orders_apr_may_2026.csv (source: src/practice/).
Demonstrate
- Modeling › New parameter › Fields › name
Group By› addCity,Platform,Category. - Bar chart: Y-axis
Group By, X-axisTotal Sales. - Choose Platform in the slicer.
Show the result
Your result should look like this (fictional sample):
| Slicer | Bars |
|---|---|
| Platform | Blinkit ₹1,100, Amazon Now ₹1,000 |
| Category | Dairy ₹1,050, Snacks ₹650, Fruits ₹400 |
Explain what happened
The axis field is swapped; the measure is evaluated per item of the new field.
Explore further
- Combine a measure parameter and a dimension parameter in one visual.
Detailed reference for this lesson:
Steps in Power BI
- Modeling › New parameter › Fields › Name
Axis Selector. - Tick
DarkStore[City],Product[Category],Orders[Payment Mode],Orders[Order Hour],Orders[Platform]› Create. - Bar chart: Y-axis = Axis Selector, X-axis = Metric Selector (from 21.1). Now users choose both what to measure and by what.
- For a dynamic date granularity, create a parameter with
'Date'[Year],'Date'[Year Month],'Date'[Date]and use it on a line chart's X-axis.
Ravindra Bagale's Tip
Friends, don't make a mistake here: multi-select in a field-parameter slicer adds several fields to the chart at once, which confuses users, so use single select. Also check the sort after switching fields (… › Sort axis), because the visual sorts by whichever field is currently selected. It's very simple – just make it a habit.
Ravindra Bagale's Tip – मराठी
मित्रांनो, इथे चूक करू नका: field-parameter slicer मध्ये multi-select असेल तर chart मध्ये एकाच वेळी अनेक fields येतात, त्याने users गोंधळतात, म्हणून single select वापरा. Fields बदलल्यानंतर sort पण चेक करा (… › Sort axis), कारण visual सध्या select असलेल्या field नुसार sort होतो. एकदम simple आहे, फक्त सवय लावून घ्या.
Ravindra Bagale's Tip – हिंदी
दोस्तों, यहाँ गलती मत करना: field-parameter slicer में multi-select होने पर chart में एक साथ कई fields आ जाते हैं, जिससे users उलझते हैं, इसलिए single select इस्तेमाल करो. Fields बदलने के बाद sort भी check करो (… › Sort axis), क्योंकि visual उस field से sort होता है जो अभी select है. बहुत आसान है, बस आदत बना लो.
Fix common mistakes
| Wrong result | Reason | Correction |
|---|---|---|
| Sort lost after switching | Each field sorts differently | Sort by the measure |
| Column from unrelated table shows equal bars | No relationship | Use related dimensions |
| Users pick two groupings | Multi-select | Single select |
Practise independently
Practice task
Choose Category. What is the largest bar?
Hints
- Dairy has four rows.
Solution
Dairy ₹1,050.
Think like a professional
Dimension switching makes one page serve several managers – fewer pages to maintain.
Revision card