Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Ilgar_Zarbali

Field Parameters in Power BI

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:

 

  • Navigate to Options: Go to File > Options and settings > Options
  • Enable Preview Features: Under the “Preview features” section, check the “Field parameters” option and click OK
  • Restart Power BI: Save your work and restart Power BI Desktop to apply the change
  • Once enabled, creating a Fields Parameter is straightforward:

Enabling Field ParametersEnabling 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 ParametersBuilding Parameters

Now, let’s make a few formatting adjustments to enhance the Field Parameters slicer:

 

  • Remove the slicer title to keep the visual clean.
  • Change the slicer style to Tile format for a more interactive and user-friendly experience.

 

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 InteractField 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 FormulaField 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 dimensionAdding 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)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 AxisesX & 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 ChartNew 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:

 

  • Select the Column Chart in your report.
  • In the Visualizations pane, go to the Format section.
  • Expand the Data colors option.
  • Click on the fx (conditional formatting) button next to Default color.

 

I Part - Conditional FormattingI Part - Conditional Formatting

 

 

  • In the dialog box that opens: Select Field Value
  • To "What field should we base this on?" filed add Color measure

Adding Color MeasureAdding Color Measure

 

 

 

  • Click OK to apply.

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 ViewLast 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! 💼💬

 
 
 
 
 
Comments

Helpful

Turning on Field Parameters in Power BI is really helpful. This makes  reports more interactive and easier to use. Great Work!!

Great Work

I am struggling with Power BI stacked column chart total changes when switching field parameter grouping
Is there a work around for this?

@RONF 

Yes, this is a known behavior in Power BI when using Field Parameters with stacked column charts:
When you switch the field parameter (e.g., between different groupings or dimensions), the total height of the stacked columns can change, which may confuse users. This happens because:

 

  • Each grouping (e.g., Product Category vs Region) can have a different number of values.
  • The stacked column chart always stacks only the visible values, so totals may appear to change if one grouping has fewer segments than another—even if overall totals remain constant.

Workarounds:

1. Use a separate measure that doesn't depend on the parameter for the total
You can display the grand total separately as a label or line:

  • Create a measure like:

 

Total Sales = SUM('Sales'[SalesAmount])
  • Then use a combo chart (stacked column + line) to show:

                   * Stacked columns for field parameter values

     * Line for total

 

 

Thanks for the quick reply (and great article)
Yes i know about the workaround - but i still think this is bug, or at best, a feature which should have been enhanced by a configuration setting which calculate chart total for the given column regardless for visible segment or not.
-Its interesting that when i recreate the setup in Excel using pivot+charts, it does not have the same "feature" of not taking into account values if segments are not visible

@Ilgar_Zarbali Thanks for sharing . It's really nice feature . Will surly try this

Hi @Ilgar_Zarbali,

 

I am trying to use field parameter . I am using Cluster column chart and I trying to show one column with Previous month data and one should show current month data . I created field parameter for metrics like "Total sales", "Avg resolution Time" and I used this filed parameter in 1st column . Now my requrement is as per selected value in field slicer my 2nd clusterd column should show data for previous month . i wrote one DAX mesure which is not working . I am attaching DAX measure and error SS below. Please check and guide me here.

 

DAX Measure 

 

 
PM data =
Var Parameter_slicer = SELECTEDVALUE('Metric Parameter'[Metric Parameter])
RETURN
SWITCH(
     
    TRUE(),
    Parameter_slicer= "Total Tickets", CALCULATE([Total Tickets], DATEADD(Dimdate[Date], -1, MONTH)),
    Parameter_slicer="Average resolution Time", CALCULATE([Average resolution Time], DATEADD(Dimdate[Date], -1, MONTH)),
    Parameter_slicer="Average SLA Fullfilment Rate", CALCULATE([Average SLA Fullfilment Rate],DATEADD(Dimdate[Date], -1, MONTH)),
    BLANK()
)

 

Error SS

 

Priti_Gaikwad_1-1752432984336.png

 

 

Priti_Gaikwad_0-1752432873756.png

 

 

Thanks in advance

 

 

Regards,

Priti

Hi @Ilgar_Zarbali 

 

Thanks for Sharing the Useful information and Field Parameters is the One of the Best Features of Powet BI.