Let report readers use field parameters to change visuals (preview)

Field parameters allow users to dynamically change the measures or dimensions being analyzed within a report. This feature can help your report readers explore and customize the analysis of the report by selecting the different measures or dimensions they're interested in.

Video

In this video, Sujata demonstrates how your report users interact with field parameters, and also how you create them.

In the following example, the report reader can dynamically update the bar chart and table by selecting a field in the horizontal slicers above the visuals. Currently the bar chart and table are measuring COGS and analyzing by Product, based on the reader’s selection in the slicers.

Screenshot of example field parameters that dynamically update visuals based on the report reader selection.

Enable the field parameter preview

To get started you first need to enable the Field parameters preview feature.

  1. In Power BI Desktop, go to File > Options and settings > Options > Preview features.

  2. Select the Field parameters checkbox.

    Screenshot of Preview toggle for field parameters.

Create a field parameter

  1. To create a new field parameter, on the Modeling tab, select New parameter > Fields.

    Screenshot of Launch the parameter creation experience from the ribbon.

  2. To build the parameter, provide a name for the parameter and select the fields you want to use. In this example parameter, we’ve selected the dimensions Customer, Color, Category, and Product.

    Screenshot of Example of field parameter setup.

    In this dialog you can drag to change the order of the fields, or double-click any of the selected fields to change the display name.

    You can also mix and match different measures and dimensions within the same parameter. For example, you can use this feature to create a dynamic table, where the columns can be either measures or dimensions.

Use a field parameter to control visual properties

Once you’ve created a field parameter, you can use the parameter to control the measures or dimensions used in a visual.

Screenshot of Example of using a parameter in a visual.

You can use the parameter in the field drop zones for a visual. Note that certain visual properties have restrictions on the number and type of fields that you can use.

From the context menu, you can also choose if the field parameter shows the values or the display names of the selected field(s) for all non-slicer visuals.

  • In the Values box, select the down arrow next to the parameter name and select Show selected field.

    Screenshot for non-slicer visuals, customize if the visual displays the values or the display names of the selected fields.

Edit a field parameter

If you need to edit an existing field parameter, you modify the DAX directly.

For example, if you want to add a new field to an existing parameter, press Shift + Enter to start a new entry. Add a comma between each entry, and match the format shown in this example. The number after the comma indicates the order of the fields:

Parameter = {
    ("Customer", NAMEOF('Customer'[Customer]), 0),
    ("Category", NAMEOF('Product'[Category]), 1),
    ("Color", NAMEOF('Product'[Color]), 2),
    ("Product", NAMEOF('Product'[Product]), 3)
}

Screenshot of Example of editing a field parameter in DAX.

Limitations

  • AI visuals and Q&A aren't supported with the feature.
  • There's no way for your report users to select "none" or no fields option. Selecting no fields in the slicer or filter card is the same as selecting all fields.
  • Currently you can't create parameters in live connection data sources, without a local model. However, using DirectQuery for Power BI datasets and AS (preview), you can add a local model to create field parameters. Read more about DirectQuery for Power BI datasets and AS (preview).
  • You can't use implicit measures for now, so if you need an aggregated column as one of your fields, you need to create an explicit DAX measure for it. Read more about implicit vs. explicit measures.
  • Currently you can't use field parameters as the linked fields of a drill-through or tooltip page. The workaround is to use the individual fields referenced within the field parameter instead. For example, if your field parameter includes "Customer" and "Product" fields, you can link these two fields to your drill-through or tooltip page so that visuals with the field parameter can launch your drill-through or tooltip page.