Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AuroraNI
Helper III
Helper III

Highlight single point on scatter plot using slicer instead of filtering

Hi,

I would like a slicer to highlight or conditionally format the data point in a scatter plot when you select a value in a slicer.  I attach a photo below.  I would like to choose a single name in the slicer on the right and the corresponding data points be conditionally coloured red in the scatter plot.  If not possible I would be happy for the data points to be highlighted.  I have looked at some solutions online but have been unable to figure out.

Thanks

Scatter Highlight.PNG

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@AuroraNI 

I think this is what you are after:

scatter highlight.JPG

 

The method I followed was:
1) In power query, create a "Highlight ID" in the main table (basically concatenate [name] & [Time (secs)] & [x with jitter])

table highlight.JPG

2) In power query, create a Dimension Table (for your slicer) including [name] and [Highlight ID]

dim highlight.JPG

 

3) load into the model. Make sure there are no relationships between the fact table and the newly created Dim table.
model.JPG

 

 

4) Set up the slicer using the [Name] field from the newly created 'Dim Table Name'

5) Set up the scatter chart as you have done with the "x with jitter" and "Time (secs)" as your axes (make sure the fields are not summarized or aggregated). Both these fields are obviously from the main fact table.

6) Create you conditional formatting measure, like:

 

 

 

 

Condit Format Highlight measure = 
VAR check = VALUES('Dim Table Name'[Highlight ID])
VAR table_= VALUES('scatter chart highlight'[Highlight ID])
VAR calc = COUNTROWS(
   INTERSECT(check, table_))
Return
IF(calc =1, 2)

 

 

 

 

5) Use this measure as your "Rule field" in the conditional formatting inputs (set the colour for a true of "2"

And that's it.

PS. You might find some points are not visible. This is because of the density of the data (some points may be "hidden" behind others). You might have to play around with the bubble size option, the fill point or the actual colours

 

Here is the PBIX file for your reference:





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

10 REPLIES 10
kman42
Frequent Visitor

I am trying to get this to work with my scatter plot, but I don't see any conditional formatting options. I have Position on the X-Axis, Count on the Y-Axis, and Name in the Legend. I then turned all of the individual legen markers to be the same color, but I don't see a conditional formatting option of a color function for the markers. Any help?

 

Screenshot 2024-11-25 at 12.57.23 PM.png

In the original example, the conditional formatting is applied to the marker itself. So under Marker -> Color





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






PaulDBrown
Community Champion
Community Champion

@AuroraNI 

I think this is what you are after:

scatter highlight.JPG

 

The method I followed was:
1) In power query, create a "Highlight ID" in the main table (basically concatenate [name] & [Time (secs)] & [x with jitter])

table highlight.JPG

2) In power query, create a Dimension Table (for your slicer) including [name] and [Highlight ID]

dim highlight.JPG

 

3) load into the model. Make sure there are no relationships between the fact table and the newly created Dim table.
model.JPG

 

 

4) Set up the slicer using the [Name] field from the newly created 'Dim Table Name'

5) Set up the scatter chart as you have done with the "x with jitter" and "Time (secs)" as your axes (make sure the fields are not summarized or aggregated). Both these fields are obviously from the main fact table.

6) Create you conditional formatting measure, like:

 

 

 

 

Condit Format Highlight measure = 
VAR check = VALUES('Dim Table Name'[Highlight ID])
VAR table_= VALUES('scatter chart highlight'[Highlight ID])
VAR calc = COUNTROWS(
   INTERSECT(check, table_))
Return
IF(calc =1, 2)

 

 

 

 

5) Use this measure as your "Rule field" in the conditional formatting inputs (set the colour for a true of "2"

And that's it.

PS. You might find some points are not visible. This is because of the density of the data (some points may be "hidden" behind others). You might have to play around with the bubble size option, the fill point or the actual colours

 

Here is the PBIX file for your reference:





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






@PaulDBrown Thank you so much that is terrific and thank you also for the detailed explanation it made it very easy to understand the steps you took!  Have a great day!

@AuroraNI 

Hi again. Just wanted to point out that the method works even if you use the [Name] fields in the conditional formatting measure (no need for the setting up Highlight IDs etc). The reason I went with the Highlight IDs was because I was going to use SELECTEDVALUE (until I realised that each name had more than one point in the chart.)

Anyway, Just thought it was worth mentioning.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






v-lionel-msft
Community Support
Community Support

Hi @AuroraNI ,

 

Please refer to my .pbix file.

v-lionel-msft_0-1595482306976.pngv-lionel-msft_1-1595482324432.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-lionel-msft thanks for your reply, I created the measure and conditionally formatted based on your file and does a great job in changing to red.  Thank you!  I would like to keep all the other points in the scatter plot rather than filter them out very much like the solotion here: http://sqljason.com/2018/03/highlighting-scatter-charts-in-power-bi-using-dax.html

 

I attach my PBI file below

Scatter Plot using slicer to highlight and not filter 

Hi @AuroraNI ,

 

Looks like you are looking cross-highlighting feature in Power BI. See the link below:

https://docs.microsoft.com/en-us/power-bi/create-reports/power-bi-reports-filters-and-highlighting#a...

 

In think it doesn't exist for scatter charts but exists for bar-charts, pie-charts, etc.

Check the document in the above link.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Change the slicer to a table. 

now when you click on a name, it should dynamically highlight the corresponding data. 

Hi Thanks for the reply,

I have tried this but it filters the data and only shows the selected data points...I would like to keep all the other data points either in the same original colour or faded.Scatter Highlight2.PNG

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors