Forum Discussion

Krushnab85's avatar
Krushnab85
Helper I
2 years ago
Solved

Scatter chart X axis sorting issue

Hi I am using a scatter chart, i placed Date on X axis, Count of orders on Y axis, Days from order to ship in the legend, Count of orders in the size. But the visual is not sorting as per date, I hav...
  • Ritaf1983's avatar
    2 years ago

    Hi Krushnab85 
    I replicated your scenario on my data and it worked correctly :

    make sure that the data type of the date column is date:

    and try to compare our files.
    If it still doesn't work share a link to your pbix

    My example is attached.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

  • Ritaf1983's avatar
    Ritaf1983
    2 years ago

    Hi Krushnab85 

    Apologies for the delayed response, I had a busy day.

    The sorting issue is caused by the clustering of shipping days.
    Without it , the sort order is correct:

     

    The last two points are outliers in terms of the clustering that the graph performs, and that's why you're not able to sort properly, unfortunately, there is no way to fix it.

    In the past, we had a categorical scatter plot for these purposes, but unfortunately, it no longer exists.

    You can try to replace this graph with a line graph with only markers (no lines). Of course, you won't be able to affect the size of the points, but you will be able to show the division by colors as you are doing here.
    Please refer to the linked discussion for more information.

    https://community.fabric.microsoft.com/t5/Desktop/Scatter-chart-two-data-points-not-in-date-order/td-p/2560677

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly