Forum Discussion
Azure Map conditional line color
- 7 months ago
Hi LangMan123
This is my workaround suggestion:
- Create a Legend column for your red and green paths.
- Duplicate the red lines as green and merge them into your main table.
- Create a Legend Sort Order column and assign a higher number to the red line.
- Use the Sort by Column option to sort the Legend column using this sort order column.
I have attached the sample I created for your reference.
Yes this is possible, you just need a way of grouping them (Path ID) and an order of the grouping (Path Order) so PBI knows how to sequence them. You can then change the colours based on a legend.
This Video illustrates the point. Let me know how you get on!
I tried and it's not working. When I use the Path ID for speeding and not, it creates two seperate routes, one for speeding and one for not speeding.
- JamieHolding7 months agoResolver I
As rohit1991 explained, you'd need to split each speeding/non-speeding segment into parts, so you'd end up with multiple speeding/non-speeding path IDs, I'd even suggest doing each individual pair of points as a single path ID and just marking up each path ID to be speeding/non-speeding.
- umad-data7 months agoNew Member
Thank you for raising this question. I have encountered a very similar issue.
I am still learning Power BI, and based on my reading and research, I found a few possible approaches. I am sharing them here for discussion and would appreciate confirmation or corrections from experienced members.
Splitting the route into segments in the data model based on speed conditions and assigning a unique Path ID to each segment, then using the Legend field to apply fixed colors.
Using the Bubbles layer while keeping a single route line color and applying conditional formatting to reflect speed at each point.
Exploring custom map visuals from AppSource that may provide more flexibility.
These approaches have not been tested by me yet, but they seem logical based on what I have read. Any guidance would be appreciated. Thank you.