Forum Discussion
Creative Solution Required - User input fields on a Scatter Chart
- 7 months ago
Hii RockandGrohl
Use will create two numeric parameters and then use a measure that "injects" those parameters as a new data point into your chart.
Step 1: Create the Numeric Range Parameters
Go to Modeling > New Parameter > Numeric Range for both your X and Y values:
- Input X: (e.g., Range 0 to 1000) -> Creates a table Input X and a measure [Input X Value].
- Input Rate: (e.g., Range 0 to 500) -> Creates a table Input Rate and a measure [Input Rate Value]. Add these as Slicers on your report page.
Step 2: Create the "Combined" Measures
You need to create X and Y measures that return the database values for your products plus the parameter value for a "Virtual Product."
X-Axis Measure:
Plot X = IF( SELECTEDVALUE('Database'[Product_ID]) = "USER_INPUT", [Input X Value], MAX('Database'[Quant 1]) )Y-Axis Measure:
Plot Rate = IF( SELECTEDVALUE('Database'[Product_ID]) = "USER_INPUT", [Input Rate Value], MAX('Database'[Rate]) )Step 3: The "Dummy Row" Trick
For the measures above to work, the chart needs a "row" to attach the user input to.
- In your Excel/SQL source, add one "Dummy" row to your Database table.
- Set the Product_ID (or Name) of this row to "Your Quote".
- Leave the Quant 1 and Rate for this specific row as 0 or Blank.
Step 4: Configure the Visual
- Drag Product_ID to the Values bucket.
- Drag [Plot X] to the X-Axis bucket.
- Drag [Plot Rate] to the Y-Axis bucket.
- Formatting: Go to Markers > Color and use Conditional Formatting. Set the color to Red if the Product_ID is "Your Quote", and Blue for everything else.
Why this works:
- Single Axis: You are only using one Y-axis, but the measure dynamically changes its logic based on which row it is currently plotting.
- Interactivity: As the user moves the sliders, the "Your Quote" dot will move live across the screen while the database dots remain static.
Summary for the Community
Don't try to add a second Y-axis. Instead, add a Dummy Row to your data and use DAX Measures to swap that row's coordinates with your Numeric Range Parameter values.
If this "Virtual Point" strategy allows you to compare your quotes against the database, please mark this as the "Accepted Solution"!
Hii RockandGrohl
Power BI doesn’t support true free-text or numeric user input fields on visuals, but this can be achieved indirectly using numeric range parameters (sliders) or a disconnected single-row table to capture X and Y values. You then create measures that read those parameter values and plot them as a separate series on the scatter chart alongside your actual product data. While Power BI doesn’t allow a secondary Y-axis on scatter charts, this workaround lets users slice by product type and dynamically place their own comparison point on the same chart using sliders, which is the standard and supported approach today.
Hi Rohit, thanks for the response.
My scatter chart in question has the X axis which is the product length, and then the Y axis is the product price. Perhaps I misunderstood your response but I will need the plot the user-input dot in the correct X & Y space.
So to recap, the product type is already chosen with the slicers, but I still need to plot the quote against other dots. This is a good example of what I mean where the orange dot is the user quote against the blue dots (confirmed price in database)