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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Scatter Plot sorting issue when adding legend

Hi Team,

 

here is my requirement: 

Need to plot period on X axis (Drill down from year-qtr-month) and Amount on Y axis in a scatter plot. when we hover over the bubble the product name should appear.

For sorting of the month i have cretaed a month sort coulmn (Year*100+month_number), Qtr is sorted based on the year (Qtr value is like Qtr 1 2019, Qtr 2 2019 ...)

Same year,quarter,month can have multiple products so have added the product name in the legend, this is resulting in wrong sorting of the X axis.

 

Untill we add Product in the legend the sorting is perfect but as soon as we add product its sorting on the legend.

 

I have tried sort by year also, sort ascending descending also. Wrong Sorting after adding legendWrong Sorting after adding legendWhen legend is removed sorting is correctWhen legend is removed sorting is correct 

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

If you add ‘Legend’, visual will always sort X axis group by ‘Legend’.

v-lionel-msft_0-1599121452213.png

v-lionel-msft_1-1599121484755.png

 

Best regards,
Lionel Chen

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

View solution in original post

6 REPLIES 6
pranit828
Community Champion
Community Champion

HI @Anonymous 

If you have a date field, I would use the date hierarchy and drill down.

If not i would create one and use as hierarchy.

pranit828_0-1598589817897.png

And on top of the chart check the marked button in screenshot below, click it once to get the year and quarter.

pranit828_0-1598590075947.png

 

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
Anonymous
Not applicable

Still the issue is not solvedStill the issue is not solved

@pranit828  the issue remains the same.

HI @Anonymous 

Observe closely the icons and names next to the image below as in my case. Bottom four icons and names are auto generated for a date data type. You don't have to do it manually.

pranit828_0-1598593382064.png

Your data type has to be of type date as in below case. You are getting the issue as you have data type other than date.

pranit828_1-1598593441021.png

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

@Anonymous , do you have sort column defined for qtr year. this format will not sort

 

Qtr year sort = format([Date],"YYYYQ") 

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column

 

Now you can sort your qtr column

 

Anonymous
Not applicable

@amitchandak 

 

I have sorted the quarter column it works perfectly fine with Line Chart or any other chart but not with Scatter plot. I did try wat u gave still the same issue persist.Sorting.JPG

Hi @Anonymous ,

 

If you add ‘Legend’, visual will always sort X axis group by ‘Legend’.

v-lionel-msft_0-1599121452213.png

v-lionel-msft_1-1599121484755.png

 

Best regards,
Lionel Chen

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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