Making most of Field Parameters in Power BI

Field Parameters: Applications, use-cases, and tips to excel

Dhyanendra Singh Rathore
6 min readJun 13, 2022
Photo by cottonbro from Pexels

Recently Microsoft announced the public preview of field parameters in Power BI. Field parameters aim to provide an out-of-the-box feature to dynamically change the measures and dimensions in a Power BI visual.

This article looks at a few applications and use-cases of the field parameters, the challenges they address, and a few tips to make your implementation easier and data model complexity free.

Please read our terms of use before proceeding with this article: https://dhyanintech.medium.com/disclaimer-disclosure-terms-of-use-fb3bfbd1e0e5

First things first

Field parameters are in preview, and as with all things in preview, you need to enable them from the report settings. Please read the following article on steps to enable field parameters and understand how to create, use and edit them.

At the time of writing, Field parameters are in ‘Public Preview’. It is recommended not to use any preview feature in production environments.

Recommended reading: SQLBI's article on the technical aspects of the field parameters.

Applications and use-cases

Setting up field parameters in a report is pretty straightforward. An intuitive dialog box facilitates the creation and initial setup. In addition, DAX offers the flexibility for further modifications. Field parameters can be utilized to dynamically

  • change the legends or axes in a visual
  • change the dimensions in a table or matrix
  • add new columns in a table or matrix
  • add hierarchies in a matrix and
  • change the measures used in a visual, table, or matrix

Traditionally, Power BI developers would achieve similar results by creating a calculated table and a bit of "model magic" or creating bookmarks for every dynamic view. In contrast, field parameters simplify the life of report authors by providing an in-built implementation to address the dynamic requirements. The following images demonstrate some applications of the field parameters.

Power BI: Using field parameters to dynamically change chart axes and legend (Image by author)
Power BI: Using field parameters to dynamically add columns in a table (Image by author)
Power BI: Using field parameters to build a dynamic matrix (Image by author)

Field parameters in the wild

Field parameters can significantly simplify the report and data model while encouraging user-friendly design and a smooth experience. A few of the benefits field parameters offer are:

  • A limited-functionality alternative to the personalization feature: Field parameters can reduce the dependency on the personalization feature. A strategical implementation can provide a user-friendly alternative where users can change the dimensions and measures to fit their needs from a predefined set of options without being able to change the visual type. They can also reduce the dependency on third-party tools by replacing the perspectives in some scenarios.
  • Faster time to development and maintenance: Adding new dimensions or measures to many visuals and keeping the UX smooth and elements aligned has never been simpler. One of the unique features of field parameters is their reusability. Define once and use it many times on multiple pages or reports. Then, the changes reflect automatically with little to no effort spent on the design.
  • A centrally managed approach for consistency across reports: Field parameters provide a centrally managed and controlled approach to scenarios where multiple reports share a dataset. Field parameters ensure that all the reports are consistent with the dynamic options they offer to end-users. This approach requires the least maintenance and efforts to add, remove or edit dimensions or the columns they depend on.
  • Reduced model complexity by eliminating the need for "model magic": The most popular method of creating dynamic dimensions, legends, and axis is to create a calculated table, some "model magic," and measures to fit the dynamic needs. Field parameters eliminate the need for a manually created calculated table and the "model magic," thereby reducing the overall complexity of the data model.
  • Reduced maintenance efforts by decreasing the number of bookmarks: Another popular approach to implementing dynamic dimensions is to use bookmarks and buttons. A bookmark is created for every view and navigated using a button. However, bookmarks are challenging to manage, especially with ever-changing requirements. Therefore, field parameters reduce the number of overall bookmarks in a report by eliminating bookmarks used to introduce dynamicity in the report.

Tips to succeed

Field parameters are easy to work with; however, things can get messy if you don't establish a clear strategy to define and manage them. For instance, let's say you have a reporting solution spanning multiple pages. Many of those pages have dynamic requirements but with different dimensions and measures.

How do you proceed? Do you create multiple parameters, one for each set of fields or measures? How about fields with similar names but different base columns, e.g., Year (from sales and order). Should you create different parameters for them? How do you differentiate between them if you decide to keep them in one parameter? How do you ensure you're not adding unnecessary complexity to your data model? A correct implementation depends on your situation and the report setup. There's no one solution to fit all situations, but here are a few tips to help you decide:

  • Keep your dimensions and measures in separate parameters: it helps to keep things simple and separates the slicer values according to their usage. After all, it doesn't make sense to show measures on a line chart's x-axis or a dimension on the y-axis (neither is it allowed).
  • Keep the number of parameters as minimum as possible: it doesn't mean you stuff all the options into a single parameter. Instead, split the fields to multiple parameters as necessary but keep them to a minimum to avoid adding extra complexity to the data model.
  • Use the visual level filter to show only the relevant fields in the slicer: you can easily control the fields in the slicer by selecting the set of relevant values. The rest of the fields function as usual. Using the visual level filter helps keep the number of parameters minimum.
Power BI: Use the visual level filter to show relevant fields in the slicer (Image by author)
  • Fields with similar names: the flexibility to edit the DAX behind a field parameter makes it easier to address this situation. First, edit the DAX to add a new column to identify the field based on source, applicability, or any other keyword. Second, rename this new column to a meaningful name. Third, use the column as a visual level filter to filter out the irrelevant fields.
Power BI: Field parameter — edit DAX to add column (Image by author)
Power BI: Use a visual level filter to distinguish the field with similar names (Image by author)
  • Building dynamic matrix with a single select slicer: I wrote a detailed article to deal with the situation where I had to build a dynamic matrix with a single select slicer to replace some existing bookmarks. The solution is easier than expected and requires some "model magic." ;)

That's all for now. Let us know what other interesting scenarios did you use them for.

Conclusions

Power BI has addressed one of the significant challenges of the developers with field parameters. Field parameters provide an out-of-the-box feature to implement dynamicity while reducing maintenance and development efforts.

Let’s wait and see what more field parameters offer once they move from preview to general availability.

Like this post? Connect with Dhyan

Let’s be friends! You can find me on LinkedIn or join me on Medium.

--

--