Using Parameters in Power BI for Interactive Reports

How to replace hard-coded values with dynamic, user-controlled parameters that connect directly to DAX measures.

Parameters give report viewers the power to change calculations on the fly without touching any code. 

  • Parameters replace hard-coded values with interactive controls. Instead of locking a calculation to a fixed value like a 7-day window, a parameter lets viewers choose their own value through a slicer, making reports far more flexible and useful.
  • Connecting parameters to DAX is straightforward. Using the SELECTEDVALUE function, you can link a parameter's user-selected value directly into your existing DAX measures, with a fallback default for when no selection is made.
  • Dynamic calculations reveal patterns that static reports miss. By letting users adjust variables like the number of days in an attribution window, they can explore how results change across different scenarios and uncover insights that a single fixed view would never show.

This lesson is a preview from our Power BI Certification Course Online (includes software & exam). Enroll in this course for detailed lessons, live instructor support, and project-based training.

When building Power BI reports, it is common to use fixed values in DAX measures. A marketing attribution report might calculate revenue that occurred within seven days of a campaign touch, with that seven-day window written directly into the DAX code. The report works, but it only answers one question: what happened within exactly seven days?

Report viewers inevitably want to explore different scenarios. What if the window were three days? Ten days? Same day only? Without parameters, answering each of these questions requires editing the DAX measure, changing the number, and refreshing the report. Parameters eliminate this friction entirely by putting the control in the hands of the viewer.

Creating a Parameter

In Power BI, parameters are created through the Modeling tab. You define a name for the parameter, set a minimum and maximum value, choose the increment, and specify a default. For a marketing attribution window, a parameter named "Number of Days" might range from zero (same-day attribution) to fourteen (a two-week window), incrementing by one day at a time, with a default of seven to match the original hard-coded value.

Power BI generates a slicer control that you can place on your report page, giving viewers a clean interface for selecting their preferred value. Behind the scenes, Power BI also generates a supporting table and measure that you will connect to your existing DAX.

Connecting the Parameter to DAX

The connection between the parameter's slicer and your DAX measure is made using the SELECTEDVALUE function. In the original measure, wherever the hard-coded value of seven appeared, you replace it with a SELECTEDVALUE call that reads from the parameter, with seven as the fallback default. This means that when no selection is made, the report behaves exactly as it did before. When the viewer adjusts the slicer, the measure dynamically recalculates using their chosen value.

Exploring Data Dynamically

With the parameter connected, the report becomes an interactive analysis tool. Sliding to zero days shows only same-day purchases following a marketing touch, typically a small number. As the window expands to one day, two days, and beyond, more sales are captured and revenue increases. At some point, the incremental gains flatten out as the window extends past the period where marketing touches are likely influencing purchases.

This dynamic exploration allows viewers to identify the point of diminishing returns for campaign attribution, compare how different campaigns perform across different time windows, and make more informed decisions about how to measure marketing effectiveness. All of this analytical power comes from a single parameter addition that takes just minutes to implement, making it one of the highest-value, lowest-effort enhancements you can add to any Power BI report.

photo of Dan Rodney

Dan Rodney

Dan Rodney has been a designer and web developer for over 20 years. He creates coursework for Noble Desktop and teaches classes. In his spare time Dan also writes scripts for InDesign (Make Book Jacket, Proper Fraction Pro, and more). Dan teaches just about anything web, video, or print related: HTML, CSS, JavaScript, Figma, After Effects, Premiere Pro, Photoshop, Illustrator, InDesign, and more.

More articles by Dan Rodney