Field parameters in Power BI: let readers switch what a chart shows
Use field parameters in Power BI so readers pick the measure or the breakdown from a slicer: setup, editing the DAX, a title that follows the choice, and the limits.
Power BIFix a problem5 min read
Reports often end up with six near-identical charts: sales by region, by product, by channel, then the same again for margin. Field parameters in Power BI replace them with one chart and a slicer, where the reader chooses the measure, the breakdown, or both. They're built into Power BI Desktop and need no custom visual.
- The reader picks "Margin" and "Region" in two slicers
- Each slicer filters its field parameter table
- The chart's axis and values point at those parameters
- The chart redraws as margin by region
Create a field parameter
- In Power BI Desktop, select Modeling > New parameter > Fields.
- Name the parameter after what the reader chooses, for example Breakdown.
- Select the fields to switch between, such as Region, Product category and Channel. Drag them to change the order, and double-click one to change the name readers see.
- Leave Add slicer to this page selected and select Create.
Make a second one, Metric, with your measures: Sales, Margin, Orders. You can mix measures and columns in one parameter, which is how you build a table whose columns the reader chooses.
Use it in a visual
Build a bar chart and use the parameters instead of fields:
- Breakdown (a parameter of columns) goes on the Y-axis (or X-axis for a column chart).
- Metric (a parameter of measures) goes on the X-axis values.
If the reader selects several measures and the visual supports more than one, they're shown side by side. The same parameter can drive several visuals on the page at once.
The slicer readers use
The slicer the setup added lists the field names: the reader picks Region or Channel. Two settings worth knowing:
- Turn on Single select in the slicer's format settings when only one choice makes sense, such as one measure on a single-series chart.
- For a parameter of columns, right-click it in the Build pane and choose Show values of the selected field. The slicer then shows the values of each field as levels of one hierarchy. With Year, Month and Weekday in one parameter, a reader can filter to "every Sunday" or "Sundays in March 2026" from one slicer. Show selected field switches it back. (This isn't available for parameters of measures.)
A title that follows the choice
A chart titled "Sales by region" is wrong as soon as someone picks Margin or Channel. Each parameter is a table whose first column, named after the parameter, holds the display names, so a measure can read the reader's choices:
Chart title =
SELECTEDVALUE ( Metric[Metric], "Several measures" )
& " by "
& LOWER ( SELECTEDVALUE ( Breakdown[Breakdown], "several breakdowns" ) )
Select the chart, go to Format visual > General > Title, select fx next to the title Text, pick Chart title in the dialog, and select OK. The measure must return text, which this one does. SELECTEDVALUE returns the fallback text when more than one field is selected.
Edit it later
There's no dialog for editing; you change the DAX. Select the parameter table in the Data pane and its definition appears in the formula bar:
Breakdown = {
("Region", NAMEOF ( 'Store'[Region] ), 0),
("Product category", NAMEOF ( 'Product'[Category] ), 1),
("Channel", NAMEOF ( 'Sales'[Channel] ), 2)
}
Each row is the name readers see, the field, and its position. To add a field, add a comma and a new row with the next number. Microsoft supports exactly these three values per row and says to keep every value unique; extra columns can give unexpected results.
Limits to know
- A column won't add up in a measure parameter: field parameters can't use implicit measures. Create an explicit measure, such as
Orders = COUNTROWS ( Sales ), and add that. - The date hierarchy disappears: a date column in a parameter loses its auto Date Hierarchy. Add the levels you want (Year, Quarter, Month) as separate fields instead.
- Clearing the slicer shows every field: readers can't choose "none". No selection behaves like all.
- Q&A or an AI visual ignores the parameter: they don't support field parameters.
- The drill-through page won't accept the parameter: link the individual fields it contains instead.
- No New parameter option on a live connection: add a local model by switching to DirectQuery for Power BI semantic models, then create the parameter.
Do
- Keep parameters short: three to six choices that make sense on the same chart.
- Give each choice a reader-friendly display name in the dialog or the DAX.
- Pair every parameter-driven chart with a title that changes with it.
Don't
- Don't mix measures with very different scales (a count and a percentage) in a chart that shows several at once.
- Don't add extra columns to the parameter's DAX table.
Field parameters change what is shown; to change how each value looks, see our heat map tutorial for conditional formatting, and designing a KPI card for headline numbers.
Sources
Did this fix it?
Comments
No comments yet. Share what worked for you.
Sign in to comment. Comments show under a display name you choose, never your email.