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"!
Hi RockandGrohl , Thank you for reaching out to the Microsoft Community Forum.
Yes, it is supported and you don’t need a secondary axis to do it. A Power BI scatter chart can plot multiple series in the same X–Y space, even when one of those series does not come from rows in your data table. The key is that the user’s quote is treated as a separate series whose X and Y values come from measures, not from product rows.
Capture the user’s length and price using numeric range parameters (or a disconnected single-row table) and then expose those values through measures. Those measures are placed on the same scatter chart alongside your product data, using the same X and Y axes. Power BI evaluates the product dots from the Database table as usual and simultaneously evaluates the user quote measures once, producing a single comparison point in the correct X–Y position. Product type slicers will continue to filter the blue product dots normally, while the orange quote dot remains visible because it is intentionally disconnected from the product table.
- RockandGrohl7 months agoFrequent Visitor
Hi, thanks for the response.
I'm not sure I understand. On my X-axis I have "Rate", on my Y-axis I have Cost, these columns come from the database.
I then have the 2 Numeric Range parameters to allow for user-input. The results of these are captured as X & Y values.
But I cannot add these to the fields in the scatter chart as I am only allowed one extra field in the X axis.
Could you please elaborate on your ansewr, thank you?