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
SPaine86
Helper I
Helper I

Scatter plot markers - how to change layering? (bring certain markers to front)

Good afternoon,

 

I have a simple scatterplot comparing the performance of different UK secondary schools.

 

In the dataset I have identified nine schools that we are focused on, and they have a different marker colour to make them easier to spot. However, there are times when they are hidden beneath other markers - making it tricky to see where those schools are. 

 

Is there any way to make these markers sit on top of the other markers ("bring to front")? I have already tried creating a sort column, putting these markers at both the top and the bottomof the series (it doesn't seem to make a difference - I'm guessing because there isn't a sort function in the scatter visual).

 

The column identifying the schools is a 6-digit integer called URN.

 

SPaine86_0-1734443920826.png

 

Thanks in anticipation for your help! 

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Have a look at the DAX query created by the visual. It may give you a hint at a possible sort order. Remember you have to sort in two dimensions.

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Have a look at the DAX query created by the visual. It may give you a hint at a possible sort order. Remember you have to sort in two dimensions.

Great advice, thank you!

 

I wasn't sure how to see the DAX code created by a visual, so I used google.

 

The solution was to go to Optimize, then Performance Analyzer:

SPaine86_0-1734509059256.png

 

I then clicked 'Start recording', and I changed a filter so that the visual would be triggered.

 

I then expanded the 'visual' in the recording, and clicked 'Run in DAX Query View' so that I could see the code behind the visual:

SPaine86_1-1734509142610.png

 

At first, this all looked correct - right? The Sorting was by the URN_srt column as I expected, and then by URN:

SPaine86_2-1734509200213.png

 

But then, when I checked the numbers in the URN_srt column below, I realised they were not behaving as expected. I thought I would see custom numbers (i.e. 999999, 999998, 999997, etc) for the URNs I wanted to appear on top, but instead they were just a duplicate of the URN number.

 

A quick look at Power Query revealed that I had a 'type mismatch' issue in one of my queries - the URNs were recorded as a TEXT field, but the formula I had written to add a URN_srt column was looking for integers. I changed the URN column type to number (in a new step added before my 'add URN_srt column' step), and now the visual is working as expected.

 

Thank you, I have learned a new technique today which is extremely helpful! 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors