Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Unable to sort by month when using scatter chart

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.

zhrhr_0-1611058658296.png

 

Picture below is when I put the legend.

zhrhr_1-1611058688822.png

 

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?

 

 

8 REPLIES 8
Pragati11
Super User
Super User

Hi @Anonymous ,

 

There are multiple threads for this issue in this forum. See one below:

https://community.powerbi.com/t5/Desktop/Sort-month-name-by-month-number/m-p/1515201

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Hi @Anonymous ,

 

I tried something similar at my end. Below chart is witout LEGEND have got month in right sort order:

Pragati11_0-1611139243696.png

 

Now, when I move LEGEND to it I still get my MONTH sorted in the right order:

Pragati11_1-1611139305567.png

 

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?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

@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 @Anonymous ,

 

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:

https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

 

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi,

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

@Ashish_Mathur hi, can you please show me an example? I don't quite get it

Hi,

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.