Forum Discussion

jsteffe's avatar
jsteffe
Helper III
1 month ago
Solved

Color based on slicer selection but with different forms, Scatter chart

I created a separate table for my slicer and whe I click on my slicer, my selectdpoint appears in RED in my scatter chart :  It works with this function I put on Markers -->  Color --> functio...
  • Prince0011's avatar
    1 month ago

    Unfortunately, what you're trying to achieve isn't currently supported by the native Power BI Scatter chart.

    When you use:

    • Legend β†’ Power BI assigns colors automatically by category and disables conditional formatting (fx) for marker colors.

    • Conditional formatting (fx) for marker color β†’ You can't simultaneously use the Legend to control marker shapes/colors.

    So these two features are mutually exclusive in the current visual.

    Possible workarounds

    Option 1 (Recommended): Use Style instead of Legend (if available)
    If you're using the newer scatter chart experience, check whether you can assign your Type field to Marker shape/Style instead of Legend. This allows:

    • Shape = Type

    • Color = Conditional formatting (your DAX measure)

    If your version of Power BI doesn't support this, you'll need one of the alternatives below.

    Option 2: Use a custom visual
    Some custom scatter visuals (e.g., Deneb or Charticulator) provide much greater control over marker color, shape, and size simultaneously. With these, you can:

    • Color points based on your selected firm.

    • Assign different marker shapes based on Type.

    • Keep everything in a single visual.

    Option 3: Use a single conditional formatting measure
    If you're willing to give up the automatic legend colors, you can keep your DAX measure:

    color_selected_point =
    IF (
        SELECTEDVALUE(Slicer_firms[FirmName]) = MAX(data[FirmName]),
        "#FF0000",
        "#1F77B4"
    )

    and use marker shapes (if supported by your visual version) to distinguish the different Type values.

    Why this happens

    The native Scatter chart currently allows either:

    • Legend to drive category formatting, or

    • Conditional formatting (fx) to drive marker colors,

    but not both at the same time.

    If your goal is blue points with different shapes by Type, and only the selected firm highlighted in red, a Deneb visual is probably the best solution, as it supports independent encoding of color, shape, size, and other attributes.

    For more information:

    πŸ’‘ Helpful? Give a Kudos πŸ‘ β€” keep the community growing.

    βœ… Solved your issue? Mark this as the Accepted Solution βœ”οΈ

    Best regards, Prince Singh | Data Science & Microsoft Fabric Enthusiast

  • kushanNa's avatar
    1 month ago

    Hi jsteffe 

     

    are you looking for an output similar to this ? 

    If this is the output you're expecting, follow the steps below:

    1. Install the Enhanced Scatter Plot visual.
    2. Select your existing Traditional Scatter Plot.
    3. Click the Enhanced Scatter Plot visual icon to switch to the new scatter plot.
    4. Drag and drop the Type column into the Shape field.
    5. Turn on the Fill Points toggle.

    I have attached a sample that I created for your reference.