Forum Discussion

Guru_BI's avatar
Guru_BI
Frequent Visitor
9 months ago
Solved

Is there a way to create a scatter plot with Parameter Input (Which is not in datasource)

Is there a way to create scatter plot visual which is showing datasource columns and I need to highlight with markers which will be coming from what if parameter input.

 

For Example in Datasource I have values as 10, 20, 30, 40 and 50. If I give parameter input as 25 - It should be highlighted in same scatter plot visual with different colour and different size. Is it achievable in Power BI. Please suggest. Thanks.

  • Anonymous's avatar
    Anonymous
    9 months ago

    Hi Guru_BI ,

    Thank you for reaching out to the Microsoft Fabric Community Forum.

     

    Currently, the scatter plot can only display points that physically exist in the underlying dataset. A What-If parameter by itself cannot generate a new point on the visual unless that value is also present in the data model.

    The conditional formatting approach shared by amitchandak is correct and will allow you to highlight an existing data point when it matches the parameter value. However, in your scenario (e.g., parameter = 25 but 25 is not in your dataset), the scatter visual has no point to highlight.

    If you need the parameter value to appear as a separate marker on the same scatter chart, you would need to create an additional table/row that injects the parameter value into the model (for example using a DAX table or a union of your original table with the parameter value). Once that value exists as a data point, you can then format it with a different color or size.

     

    Thank you.

5 Replies

  • Guru_BI , You can change the color. You can use a numeric parameter, and based on that, you can compare and change color . Make sure you are not using legend 

     

     

    Color = if([You measure] = [Parameter Measure], "Green", "Blue") 
    Use it in conditional formatting using field value option  

     

     

    Scatter Visual with quadrants conditional formatting: https://youtu.be/IPMViiZjMeA

    Scatter Visual with quadrant-based conditional formatting:
    https://youtu.be/cN8AO3_vmlY?t=15575

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Guru_BI ,

    Thank you for reaching out to the Microsoft Fabric Community Forum.

     

    Currently, the scatter plot can only display points that physically exist in the underlying dataset. A What-If parameter by itself cannot generate a new point on the visual unless that value is also present in the data model.

    The conditional formatting approach shared by amitchandak is correct and will allow you to highlight an existing data point when it matches the parameter value. However, in your scenario (e.g., parameter = 25 but 25 is not in your dataset), the scatter visual has no point to highlight.

    If you need the parameter value to appear as a separate marker on the same scatter chart, you would need to create an additional table/row that injects the parameter value into the model (for example using a DAX table or a union of your original table with the parameter value). Once that value exists as a data point, you can then format it with a different color or size.

     

    Thank you.

  • Hi   

    You can highlight points in a scatter plot based on a What-If parameter in Power BI. Here’s how:


    Step 1: Create a What-If Parameter

    1. Go to Modeling → New Parameter → What If

    2. Configure:

      • Name: HighlightValue

      • Data Type: Decimal/Whole Number

      • Minimum: 0

      • Maximum: 100 (or your data range)

      • Increment: 1

      • This creates a parameter table and a selected value slicer automatically.


        Step 2: Create a Highlight Column

        Add a calculated column (or measure if live connection) to identify points matching the parameter:

         

         
        HighlightFlag = IF ( 'Data'[Value] = 'HighlightValue'[HighlightValue], 1, 0 )
         
        • 1 → highlighted

        • 0 → normal


          Step 3: Configure Scatter Plot

          1. Add your X and Y values as usual.

          2. Add HighlightFlag to Legend.

          3. Adjust formatting:

            • Color: set different colors for 0 and 1

            • Size: set bigger marker size for 1

              Now, when you change the What-If slicer, the scatter plot dynamically highlights the corresponding points.

            •  

          4.  

          5.  

        •  

      •  

      •  

      •  

      •  

      •  

    3.  

    Guru_BI

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Guru_BI ,

     

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. 

     

    Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Guru_BI ,

     

    We haven’t received an update from you in some time. Could you please let us know if the issue has been resolved?
    If you still require support, please let us know, we are happy to assist you.

     

    Thank you.