Field Parameters

What problem are we solving today?
Dynamically change axis and choose measures to filter, slice and dice data in the Power BI reports.

Field Parameters help consumers see data sliced dynamically on the visuals. This feature is currently in Preview. To enable this, make sure you are on the May 2022 version or later and navigate to Power BI Desktop in Options > Global > Preview Features and check Field parameters. This also is only supported in Power BI and not in Excel.

For a long time, this has been one of the most requested features as users want to slice and dice data and visuals on the basis of multiple measures / values, for e.g you might want to slice the Sales visual by Month, Weeks and Days instead of drilling down/up. This was quite complex to achieve and the workaround consisted of using Bookmarks and some wizardry. With the introduction of Field Parameters, we can now easily add different measures as buttons that will in return filter the data when clicked or selected or change x / y axis on the visuals according to selected value.

Implementation

  1. Create a Calculated Table with all the Values / Columns that you’d like to use for slicing the data. Click on the Modelling > Parameters > Field Parameters. This is only supported in Power BI and not in Excel.

2. Select the Columns or Measure you will be using to slice the data and add them to the Field Parameters.

3. Bring the Slicer on the page and change the Slicer formatting to the way you like. To make it look like buttons for each of the choice, change orientation to Horizontal in Slicer Settings.

It will create some DAX for you which includes NAMEOF, which basically means the name of the column that you have referred to in this table, because you can rename the source columns at a later time and this table will fetch the correct names.

4. Make a visual that can showcase the data you want to filter by these measures and/or columns. You can now drop the SlicerTable field on x or y axis according to your use case.

In this example, we can show Product Sales by Channel, Country, Region or City.

Img showing different filters applied to the same visual

 

Limitations

There are certain limitations and here are the most important ones to keep in mind:

Without a local model, you are currently unable to create parameters in live connection data sources. 
A workaround is to add them in a local model to after using DirectQuery for Power BI datasets and AS (preview).
Q&A and AI is not yet available with Field Parameters.
Field parameters cannot currently be used as linked fields on drill-through or tooltip pages. 
 
DOWNLOAD POWER BI MODEL

    Leave a Reply

    SHARE THIS POST
    CATEGORIES
    RECENT POSTS