Power BI is considered by many as a runner-up in the data visualisation race. It is clear that the product stocks a very different toolset making it harder for those closely acquainted with Tableau to use the same approaches in Power BI. Nevertheless, this app is gaining more popularity, and, in fact, more functionality as we speak.

For one, there are field parameters in Power BI now, allowing users to switch between different metrics to display (i.e. selection to show Sales or Profit in all charts). There have been parameters covering this type of interaction in Tableau for years (as well as parameter actions providing more interactivity). In Power BI you would use a workaround to provide the same experience, but it was neither quick nor intuitive. But now parameters in Power BI are live!

Note: Do not confuse these visualisation parameters with the parameters in Power Query. They serve different purposes.

Create your first Field parameter

To illustrate their use, I will connect to the well-known Superstore dataset and build a visualisation with a choice of the metric to display as in Sales, Profit or Quantity.

1. Switch the function on in Power BI Desktop

At the time of this blog, the function is in the preview mode, so you will need to switch the feature on: go to Files – Options and Settings – Options – Preview features and Tick Field parameters. (You might need to update your Power BI Desktop, as the feature only became available in May.)

2. Connect to the datasourse

3. Create measures to display

We will provide a choice of measures to display, so we must create the measures first. I’ll create “Total Sales”, “Total Profit” and “Total Quantity” measures. You can employ the full power of DAX in these expressions.

4. Create the parameter

Go to the Modelling ribbon, click “New parameter” and choose “Fields”.

In the opened window you can name your new field parameter and drag over the fields you want to choose from the right into the left pane.

If you leave the box “Add slicer to this page” ticked, Power BI will create the selector for the fields in the current page automatically.

The created parameter will appear as a new calculated table in your fields pane.

5. Finally, build the view

Now you just build a view as usual, using the parameter as a substitute for your measure in the view. 

I built just a timeline of the metrics. Check out the live view here:

The first cool thing you notice about using this type of parameter (unlike the previous workarounds and Tableau parameter switches) is that it carries through the name and the data type of the selected measure. When we switch from Sales to Quantity, the formatting at the axis will automatically change from currency type to the whole number (if your measures have been properly set up beforehand, of course). Also, field parameters allow multi-select.

That’s NOT ALL, folks!

Stay tuned, cause I’ve found out some more cool facts about new field parameters in Power BI and will share them in my following posts.

Eugene Kutilov
Author: Eugene Kutilov

Eugene has a background in science with a master’s degree in quantum physics and decades-long experience in technology marketing. Eugene’s technology toolbox includes Alteryx, Tableau, PowerBI, SQL, Python, R, GCS. He is a Tableau Certified Data Analyst, Microsoft Certified PowerBI Data Analyst (Associate), and Certified Alteryx Designer Advanced Specialist. He is also a Certified Data Scientist by Datacamp.