Forum Discussion
Scatter plot markers - how to change layering? (bring certain markers to front)
- 1 year ago
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!