The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
Thanks in anticipation for your help!
Solved! Go to Solution.
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.
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:
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:
At first, this all looked correct - right? The Sorting was by the URN_srt column as I expected, and then by URN:
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!