Power BI-Power BI Create Dynamic Slicers using Field Parameters

Amit Chandak
4 min readDec 11, 2022

Power BI released field parameters in May 2022 and I have discussed the feature in detail in my blog post as well as in my video. Additionally, I have shown you how this feature allows you to switch measures as well as do conditional formatting based on requirements.

Power BI took this functionality and took it to the next level by allowing the creation of dynamic slicers based on field parameters, in Nov 2022.

Hopefully, you have already enabled this feature in your Power BI Desktop

To enable this feature in Power BI Desktop. Go to File → Options and Settings → Options → Preview Features and enable Field parameters

My Model

Sales Fact joined to Customer, Geography, Item, and Date dimensions

Axis Slicer

Create Field Parameter: For Dimension Slicer. Modeling Tab → New Parameters → Small Down arrow →Fields

A pop-up will open. There I dragged from right to left. State, and City from Geography. Brand, Sub Category, and Category from Item dimension.

Renamed it to Slicer and pressed create

A new table is created and the slicer appears automatically, because “add the slicer to this page” was checked. If needed, you can create a slicer using the column “Slicer”

Code of the Table

Slicer = {
("State", NAMEOF('Geography'[State]), 0),
("City", NAMEOF('Geography'[City]), 1),
("Brand", NAMEOF('Item'[Brand]), 2),
("Category", NAMEOF('Item'[Category]), 3),
("Sub Category", NAMEOF('Item'[Sub Category]), 4)
}

One slicer is already added to the page. Add another slicer on the same field: Slicer column of Slicer Table.

Both will look like

Once you have clicked on the second slicer, right-click on the field in the visualization pane and choose “Show values of selected field” from the contextual menu that appears.

An error will be displayed on the second slicer if there is nothing selected in the first slicer. You can select a value in the first one and you will be able to see its values in the second one when you select it.

Now you can apply the filter using the second one.

You can find the file here.

You can find the video below

My Medium blogs can be found here if you are interested

Click here to access all my blogs and videos in a jiffy via an exclusive glossary using Power BI. Please like, share, and comment on these blogs. I would appreciate your suggestions for improvement, challenges, and suggestions for topics so that I can explore these in more depth.

In addition, I have over 500 videos on my YouTube channel that are related to Power BI, Tableau, and Incorta. With the help of these videos, you will learn hundreds of DAX and Power Query functions, in addition to hundreds of Power BI, use cases that will assist you in becoming an expert in Power BI. Make sure you subscribe, like, and share it with your friends.

Master Power BI
Expertise in Power BI
Power BI For Tableau User
DAX for SQL Users

--

--

Amit Chandak

Amit has 20+ years of experience in Business Intelligence, Analytics, Data Science. He is Chief Analytics Officer at Kanerika & Power BI community Super User