Hi. I'm using scatter plot for my report. I want to sort by month. Everything works fine until I select the legend.
Picture below is when I remove legend.
Picture below is when I put the legend.
I tried to re-do it again, just in case if I'm mistaken anywhere, but it still shows the same error.
But if I'm using other types of chart, the order of month is correct. Can anyone help me with this? Why does this went wrong?
Hi @zhrhr ,
There are multiple threads for this issue in this forum. See one below:
@Pragati11 hi, can you help me with this? https://community.powerbi.com/t5/Desktop/Unable-to-sort-by-month-when-using-scatter-chart/m-p/160795...
Hi @zhrhr ,
I tried something similar at my end. Below chart is witout LEGEND have got month in right sort order:
Now, when I move LEGEND to it I still get my MONTH sorted in the right order:
As I can't reproduce this issue at my end, Can you share you sample pbix file for this with both the charts on it - one with LEGEND, one without LEGEND?
@Pragati11 hi, this is the pbix link. im not sure why it doesn't work only for scatter. If I change it to line or bar chart, it sorted month in order. but i needed a scatter chart. Please help https://1drv.ms/u/s!AoKh3nlpMpSOgmSAg1TMiavknFhn?e=NDMg6m
Hi @zhrhr ,
Go with the approach that @Ashish_Mathur has suggested if you are still having this issue.
The format of your Date column on that chart should be date type rather than datetime format. Also, sometimes if there are blanks or nulls in your date column which you are using on the chart, may also end up creating issues. Therefore, it is advised to have a Calendar table in your data model with relationship on your dataset used for reporting. Then use DATE column from this Calendar table on your chart.
For steps on doing this refer following article:
You should remove the time stamp from the "ACT_EXEC_COMP" column first. Then, create a Calendar Table first and then build a relationship from the "ACT_EXEC_COMP" column to the Date column of your Calendar table. In the Calendar Table, add columns for Year, Month name and Month number. Sort the Column Name by Column Number. To your visual, drag Year and Month name from the Calendar Table.
To extraxt only the date from the column "ACT_EXEC_COMP" you will need to use the Query Editor. When i go to the Query Editor in your file, i am asked for credentials.
We are excited to announce the Power BI Super Users!
Overview of Power BI 2020 release wave 2!
Mark your calendars and join us for our next Power BI Dev Camp!.
100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.