The May 2022 version of Power BI Desktop includes a very interesting and useful feature – Field Parameters. Today I will show you how to use this new feature illustrating with 3 (no, wait, 4) use cases – Chart Elements, Chart Axis, Table Contents and Permanent Ad hoc Hierarchies.
How to Access this Feature?
As of now this is a preview feature and so you have to turn it on in File -> Options. Once you have turned it on, you will need to restart Power BI Desktop. After restarting, you will find the new feature under the Modelling tab (#1), New parameter (#2), Fields (#3). Also note that previous Whatif has been renamed to Numeric Range (#4).
How to Use this Feature
Once you select Fields in the above menu, you will get a dialog as shown below. It is similar in approach to the “what if” parameters that have been there for years. You define these new field parameters by giving a name, and then adding Measures or Columns from the tables in your model. Some use cases will allow just Measures, some just Columns, and some will allow both (see video). The field parameter produces a new, disconnected table with the name you have given and the measures or table column names you have added as the values in the table column, and it will also create a Slicer connected to this table (if you leave the check box selected). The only thing you need to do is use the column created in the new table in one of your visuals. How you do that depends on the use case (see video below for the 3 (wait, no, 4 use cases).
In this video I have shown how to use Field parameters.