Stakeholders often request what-if analyses to visualize how business outcomes change under different scenarios. In this tutorial, you will build a dynamic line chart in Power BI that shows how profits fluctuate when costs increase or decrease by a user-selected percentage.

Step 1: Create the Base Line Chart Using Power BI’s native financial sample dataset:

  • Add Month Name (from the Dates table) to the X-axis.
  • Add Sales (as Sum of Sales) to the Y-axis.

Step 2: Create the Numeric Range Parameter

  1. Navigate to the Modeling tab in the top ribbon.
  2. Click New Parameter and select Numeric range.
  3. Configure the parameter options:
Name the parameter, and input the fields below, we want to keep it between -1 and 1 so that the end user can calculate % differences that are more realistic. Click “Create”.


Step 3: Link the Parameter with a DAX Measure At this stage, the slicer slider works independently and doesn't affect the visual yet. To link it to your chart, create a new measure that calculates adjusted profit based on the slider value:

Adjusted Profit = SUM(financials[Sales]) - (SUM(Financials[COGS]) * (1+'Adjust cost of goods'[Numeric range blog post Value]))

Last step! We can now drag in this adjusted profit line into our y-axis, and you should be able to move the line around with the parameter slider!

In increase in the % of COGS means the profit decreases and vice versa

With the parameter connected, users can now dynamically adjust the slider to see how fluctuations in COGS impact net profit in real time. This provides stakeholders with insight into profit sensitivity, helping them quickly evaluate how overall profit margins shift under different cost scenarios.