Power BI is a powerful business intelligence tool developed by Microsoft. Power BI is a game-changer when it comes to transforming data into actionable insights. In today’s data-driven world, businesses across industries are realizing the importance of making informed decisions based on accurate insights.
In this blog post, we will explore a cool key feature of Power BI and its benefits of use. understand how it can help to visualize your data analysis idea.
Let’s dive into the incredible capabilities of the feature of Field Parameters Using Measures.
Field Parameters Using Measures
Field Parameters is one of the coolest features in Power BI. For example, we have different visuals on our page and want to filter based on the selected measure that you created. This feature is available in the Power BI desktop from May 2022. So now, I would like to share with you a cool way of implementing Field Parameters in Power BI reports.
The main motive of this feature is Report users can switch between “dimensions” of the data. Since Microsoft made it available on Power BI Desktop, I have been playing around to see what’s possible with it. More importantly, how users can benefit from this.
Step 1: Enable the Field Parameter Feature
I envisioned a user interface created with Field Parameters. Before starting to work with this feature, you should make sure the feature is available for use or not.
Step 2: Set up the field parameter
I have a dataset regarding sales data, Data is imported to the Power BI report using Get Data. After loading data into the Power BI model, we need to create a new measure column as per the needs. In this case, I am creating three new measure columns as “TotalSales”, “TotalQuantity” & “TotalProfit”.
Go to Modeling >> New parameter >> Fields. A new window will appear, filled as per requirements.
Ensure that you select ‘Add a slicer to this page’ and press ‘Create’. This will automatically add the slicer to your page. After that, you can shape the slicer as per requirements. Slicer will look like the below-
Step 3: Modify the field parameter
Power BI has created a new calculated table called Measure Sales which has a formula. This formula shows the display names of your slicer values, there is a NAMEOF function which is connected to your actual Field and the numbers at the end of each line of the formula represent the sequence in which your slicer values appear in the slicer selection. You can easily change the order of your slicer values by changing these numbers. You can also easily change the display name of your slicer values by changing the text within the quotation marks at the start of each line of the formula.
See the data model insight Power BI model
Step 4: Create a visual using the field parameter
I am creating a new report with some visuals based on sales data from my dataset along with the Measure parameter. The below image is my visual when all three Field parameters are selected-
You can see the effect when you change (Select/Un-select any parameter), Below Image will display based on selecting one Field parameter “Total Sales”. After selecting one parameter, the rest two field parameters will automatically hide from the visual.
Field Parameter tables can also provide some flexibility when it comes to data governance.
Report authors can set up Row-level Security profiles on both the dimension parameter table and the measure parameter table, limiting access to certain fields. And setting up RLS on those tables is as easy as creating RLS on any other table.
Limitation
- Q&A and AI visuals are not currently supported with Field Parameters.
- Implicit measures (default summarization of the columns) are not supported.
- Cannot set a default option in the event that a single field has not been selected within the slicer. If no field has been selected in the slicer, by default, the visual shows the values for all fields.
We have seen how the new Field Parameters feature can be used to dynamically switch between measures in a visual. We can easily set up Field Parameters, with no complex modeling required to create advanced visuals with dynamic axis and metric selections.