Users often want the same chart to show different things: Sales today, Profit tomorrow, Orders next week; or the same measure by Region, then by Product, then by Month. Building a separate chart for every combination clutters the page. Field parameters let users switch the measure or the axis of a visual with a single slicer.
This guide shows how to create field parameters for measures and for dimensions, how to use them in visuals, and how to fix the common problems.
Quick answer: In Power BI Desktop go to Modeling → New parameter → Fields, add the measures (or columns) users should choose from, keep Add slicer to this page ticked, and click Create. Put the new parameter field in a visual's Y-axis (for measures) or X-axis (for columns). The slicer now switches what the visual shows.
What a field parameter is
A field parameter is a small calculated table that lists fields (measures or columns) and their display names. Power BI knows that when a user selects "Profit" in the slicer, the visual should use the [Total Profit] measure. Behind the scenes it looks like this:
Metric = {
("Sales", NAMEOF ( [Total Sales] ), 0),
("Profit", NAMEOF ( [Total Profit] ), 1),
("Orders", NAMEOF ( [Order Count] ), 2)
}
Each row has a display name, the field reference (NAMEOF) and a sort order. You usually create it with the dialog, but you can edit this DAX to rename items or change their order.
Example 1: Let users switch the measure
- Make sure the measures exist, for example Total Sales, Total Profit and Order Count.
- Go to Modeling → New parameter → Fields.
- Name it Metric.
- From the field list, add Total Sales, Total Profit and Order Count. Rename them to "Sales", "Profit", "Orders" if you like.
- Keep Add slicer to this page ticked and click Create.
- Create a clustered column chart: put
Regionon the X-axis and theMetricparameter field on the Y-axis. - Click "Profit" in the slicer: the chart switches to profit by region.
Set the slicer to Single select so users see one measure at a time. With multi-select, the visual shows several measures together, which can also be useful in a table.
Example 2: Let users switch the axis (dimension)
- Go to Modeling → New parameter → Fields and name it View By.
- Add the columns
Region[Region],Product[Category]and'Date'[Month]. - Click Create.
- In your chart, replace Region on the X-axis with the
View Byfield.
Now users can view the same measure by region, category or month. Combine both parameters and one chart can show any measure by any dimension.
Example 3: A flexible table
Put a dimension parameter in the rows of a matrix and allow multi-select. Users can choose which columns they want to see, like building their own report without editing it.
Show the selected measure in the title
Chart Title =
SELECTEDVALUE ( Metric[Metric], "Multiple measures" ) & " by "
& SELECTEDVALUE ( 'View By'[View By], "selection" )
Use this measure as the visual's title: Format → General → Title → fx and choose Field value. The column names in your parameter table may differ (for example "Metric" or "Metric Fields"); check the table in the Data pane.
Field parameters vs the SWITCH method
Before field parameters, the usual trick was a disconnected table and a SWITCH measure. See Dynamic Measure Selection using SWITCH.
| Field parameters | SWITCH measure | |
|---|---|---|
| Switch measures | Yes | Yes |
| Switch axis / columns | Yes | Difficult |
| Keeps each measure's format | Yes | No, one format for all (unless you use dynamic format strings) |
| Setup | Dialog, no code | Table + DAX |
Field parameters are usually the better choice today. SWITCH is still useful when the logic between measures is more complex than "show this one".
Tips and common problems
Wrong sort order in the slicer
Edit the third value in each row of the parameter DAX (0, 1, 2…) or sort the display column by the order column.
The axis does not change when switching columns
The columns must come from tables that are related to the fact table used by your measures. A column from an unrelated table shows the same total on every bar.
Conditional formatting stops working
Rules set on one specific measure may not carry over when the visual switches to another. Use a colour measure that works for all, or apply formatting to the parameter field.
The parameter does not appear in the New parameter menu
Update Power BI Desktop to the latest version. Older versions show field parameters as a preview feature that must be enabled in Options.
Frequently asked questions
Can I mix measures and columns in one field parameter?
It is possible, but it confuses users and visuals. Keep one parameter for measures and another for dimensions.
Do field parameters work in the Power BI Service?
Yes. Once created in Desktop and published, report viewers use the slicer normally.
Can I set a default selection?
The slicer keeps the selection you save in the report. Select the default item before publishing, or use a bookmark.
Practice task
Create a Metric parameter (Sales, Profit, Orders) and a View By parameter (Region, Category, Month). Build one column chart that uses both, add a dynamic title, and test every combination.
Related: Power BI slicer vs filter pane and conditional formatting with DAX.
