Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
How to Enable Field Parameters:
Before using Field Parameters, you need to enable the feature in Power BI, as it’s still in the preview:
Enabling Field Parameters
Our semantic model includes several measures, one of which is Total Sales (F).
Now, imagine you want to analyze total sales dynamically based on different dimensions such as Brand, Category, Sub-Category, or Gender.
To enable this flexibility, we can use Field Parameters. Simply go to the Modeling tab and click on New Parameter to get started.
Next, select Field Parameters, and in the “Add and reorder fields” section, drag in the Brand, Category, Sub-Category, and Gender columns from the dProducts table. Make sure the option “Add slicer to this page” is checked. Finally, give your parameter a name—for example, X Axis.
Building Parameters
Now, let’s make a few formatting adjustments to enhance the Field Parameters slicer:
These changes will make it easier for users to switch between different dimensions like Brand, Category, Sub-Category, and Gender when analyzing total sales.
Now, insert a Clustered Column Chart into your report canvas. Drag the X Axis field parameter into the chart’s X-Axis, and place the Total Sales (F) measure into the Y-Axis.
The result is a dynamic visual: as you interact with the field parameter slicer, the chart updates automatically—showing total sales by Brand, Category, Sub-Category, or Gender, depending on your selection.
Field Parameters Interact
Next, we created another set of Field Parameters, this time including our measures. After setting up the parameter, we applied some formatting—removed the slicer header and switched the slicer to Tile format for a cleaner look.
We then replaced the Total Sales (F) measure in the Clustered Column Chart with this new parameter, allowing the Y-Axis to dynamically change based on the selected measure.
With this setup, both the X-Axis and Y-Axis are now fully interactive, enabling users to explore different dimensions and measures on demand.
It’s also possible to add more dimensions to your existing Field Parameters at any time—offering even greater flexibility in your analysis. Behind the scenes, Power BI automatically generates a DAX formula that powers the field parameter, which you can review and edit if needed.
This approach not only simplifies interactivity but also keeps your model dynamic and easy to maintain.
Field Parameters DAX Formula
As you can see, we initially included four dimensions in our Field Parameter. Now, let’s add a fifth one—Product Size.
To do this, modify the generated DAX formula by adding the following line:
("Product size", NAMEOF('dProducts'[Size]), 4)
💡Note: Be sure to add a comma (,) at the end of the previous line before inserting the new entry. This small detail is crucial for the formula to work properly.
With this addition, your slicer will now include Product Size as another selectable dimension for dynamic analysis.
After adding the new dimension, the updated DAX formula for the Field Parameter will look like the one shown in the image below.
This formula now includes Product Size alongside the existing dimensions—Brand, Category, Sub-Category, and Gender—enabling even richer, on-demand analysis through a single dynamic slicer.
Adding one more dimension
Once the DAX formula is updated, the new dimension—Product Size—will be added to the Field Parameter slicer, allowing users to seamlessly switch and analyze data across all five dimensions.
New Dimension (Size)
Next, we create another Field Parameter, this time containing multiple measures instead of dimensions. We name this new parameter Y Axis, as it will control the values displayed along the chart’s vertical axis.
Once the parameter is ready, we replace the existing Total Sales (F) measure in the Clustered Column Chart with the newly created Y Axis parameter. This allows users to dynamically switch between different measures in the visual, just by interacting with the slicer.
X & Y Axises
To take our analysis a step further, we’ll add one more chart (Area Chart) and create a new Field Parameter, which we’ll call Line Axis.
Imagine a scenario where we want to compare current revenue and total sold quantities against their previous year values—all in a single visual.
Before proceeding, let’s make sure the required DAX measures are in place:
SalesLY = CALCULATE([TotalSales(F)], SAMEPERIODLASTYEAR('Calendar'[Date]))
Total Qty (LY) =
CALCULATE([Total Qty],SAMEPERIODLASTYEAR('Calendar'[Date]))
New Area Chart
We then place both Y Axis and Line Axis field parameters onto the Y-Axis of an Area Chart. This setup allows us to visualize multiple measures—such as Total Sold Quantity and Total Sales, for both the current and previous year—on the same chart.
The values dynamically update based on the selected dimension (e.g., Category, Brand, etc.), providing an interactive and comparative view of performance across time.
Most likely, consumers will expect to see the columns in different colors—especially in the Column Chart—to better distinguish between selected values.
This is absolutely possible when working with Field Parameters.
To achieve this, we first need to create a helper measure—let’s call it Selected Parameter. Here’s the DAX formula:
Selected Parameter =
MAXX(
FILTER(
'X Axis', 'X Axis'[X Axis Order] = SELECTEDVALUE('X Axis'[X Axis Order])
),
'X Axis'[X Axis]
)
💡 Note: You can also use simpler alternatives like CALCULATE or LOOKUPVALUE instead of MAXX, depending on your model structure.
This measure will return the selected dimension (e.g., Category or Brand), which you can then use to drive conditional formatting or customize column colors based on the selected field.
Now, we create our second DAX measure, which defines the color logic for each selected dimension. This measure will allow us to dynamically change the column colors in the chart based on the selected Field Parameter.
Here’s the formula:
Color =
SWITCH(
[Selected Parameter],
"Brand", "Red",
"Product category", "Purple",
"Product subcategory", "Blue",
"Product gender", "Grey",
"Product size", "Black"
)
This measure maps each selected dimension to a specific color. Once it's ready, you can apply it through conditional formatting on the column chart, ensuring that each selection results in a visually distinct and meaningful color update.
To apply the custom colors, follow these steps:
I Part - Conditional Formatting
Adding Color Measure
Now, your chart will automatically display columns in different colors based on the selected dimension—making the visual more intuitive and visually appealing for users.
Last View
Thank you for exploring our latest newsletter on building dynamic, interactive visuals using Field Parameters in Power BI! We hope this guide has shown you how easily you can empower your reports with flexible axis selections, dynamic measure switching, and even customized column colors—all with just a few clicks and DAX formulas. Stay tuned for future editions, where we’ll uncover more powerful features, showcase real-world scenarios, and help you elevate your Power BI storytelling. Don’t miss out—subscribe now and keep transforming the way you deliver insights!
🎉 Exciting News for My Readers! 🎉
I'm thrilled to share that I’ve partnered with the European Microsoft Fabric Community Conference 2025, taking place in Vienna this year!
As a thank you to my newsletter community, the organizers have generously offered a special €150 discount for anyone who registers using the code: IlgarNewsletter
🗓️ The full agenda will be announced in June, but trust me—this is the Fabric event you won’t want to miss. Stay tuned for more updates in upcoming editions of this newsletter, where I’ll highlight key speakers, sessions, and insider tips.
🔗 Learn more and register here:
European Microsoft Fabric Community Conference 2025!
Let's meet in Vienna and connect with fellow data professionals from across Europe! 💼💬
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.