Fields Parameter in Power BI?

Fields Parameter feature is one of the newest features for Power BI as per monthly release May 2022.

What is Fields Parameter?
Previously we had to use lots of bookmarks to create dynamically changing visuals? But now with the help of Fields Parameter is we can achieve that kind of requirements very quickly.

What does it do?

Fields Parameter helps to perform the dynamically change the measures/dimensions that are being used to create visuals within a report.

It enables you to choose from different fields. You can easily toggle between different fields that you add to this parameter to see various results.

In order to create a field parameter, you will need to first enable the Preview feature called ‘Field parameters’:

Then, to create a new field parameter, you will need to navigate to Modeling -> New parameter -> Fields:

To build the parameter, you will need to provide a name for the parameter and select the fields you want to use.  In this example for a field parameter, we’ve selected different dimensions:

In this dialog, we may drag and drop to change the ordering of the fields or double click on any of the selected fields to change the display name. 

 You may also mix and match different measures and dimensions within the same parameter. 

 For example, this feature can be used to create a dynamic table, whereby the columns may be either measures or dimensions.

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

You may use the parameter in the field drop zones for a visual. 

Note that certain visual properties have restrictions on the number of fields that may be used or the types of fields that can be used.

From within the context menu, you can also change whether the field parameter is showing the values of the selected field(s) or the display names of the selected field(s) for all non-slicer visuals, viz.

Finally, if you need to edit any existing field parameters, you will need to modify the DAX directly.  For example, if you want to add a new field to an existing parameter you can click SHIFT + ENTER to start a new entry:

You’ll need to add a comma between each entry, and you will need to match the following format:

In previous snapshot on formulae editor

(“<display name of choice>”, NAMEOF(‘<table name>’[<field name>]), <ordinal number used for sorting>)

Limitations:

• AI visuals and Q&A are not supported with the feature

•There is no way for end users to select ‘none’ or no fields option. 

•This is because selecting no fields in the slicer or filter card is the same as selecting all the fields

•you cannot use implicit measures for now, meaning if you need an aggregated column as one of your fields, then you would need to create an explicit DAX measure for it

•example of implicit measure: ∑ Sales

•example of explicit measure: Measure = SUM(‘Table’[Sales]).

Thank you for the read. Please share if any comments

Leave a comment