Forum Discussion
Scatter chart - two data points not in date order
- 4 years ago
Hi Anonymous ,
I have tested your data and could replicate the problem and also understand the grouping by date and legend together and then sorting.
Since last 2 days, I am trying sorting of x axis date with an index column, but somehow it does not allow date.
One more workaround is to use line chart in place of scatter chart, and not use the line color but just the marker color, and sort by date. It works fine even with legend, but you need to specify legend colors manually while publishing the report.
Hope it helps.
If you see that it is grouping the data based on the legends. then it is applying the sorting.
you may want to use another visual if you want your x-axis to be sorted by Date without grouping. You may try out Dual Axis Scatter Chart
I can confirm that removing the legend puts the data back chronological order as shown in the picture below.
Whilst this solves the problem, it's not a workable solution for me. I need to easily see when a powder batch change occurs and correlate this with any change in result on Y-axis. Tooltips is too slow to check for every point so the legend/colour coding data points is the most logical solution.
Is there really no way to add a legend and not subgroup the data?
- FarhanAhmed4 years agoCommunity Champion
Hi Anonymous
There is one work around that you can check if possible in your scenario
you can assign color to different category using DAX
Color = SWITCH('Table'[Product], "A","Blue", "B","Green", "C","Yellow", "D","Gray", "Brown")Then use Marker conditional color expression to Field Value
Then you will get results like below sorted by date
but you will not get the Legends as what color represtenting what data.
may be a table right next to visual something like below to give view like legends. similar conditional formatting apply on the table
see if this works for you.
- Coriel-114 years agoResolver II
This worked for me. Thanks
Matt
- FarhanAhmed4 years agoCommunity Champion
Try using this visual from Store