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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
huseyincenik_28
Frequent Visitor

When I add quarter date to the x axis in the scatter chart, I cannot sort on the axis.

When I add quarter date to the x axis in the scatter chart, I cannot sort on the axis.(Picture 1)

 

huseyincenik_28_2-1721404561921.png

Picture 1

 

When I use the Sort option on the Scatter(Picture 2), it does not sort exactly, it sorts some of them incorrectly. Can you help me with this?

 

While the Sort Ascending order is as in Picture 1, the Descending order is as follows.

huseyincenik_28_3-1721404593420.png

 

Picture 2

 

1 ACCEPTED SOLUTION

I did what you said and it did not solve my problem because the data contained duplicates.

huseyincenik_28_1-1721632737344.png

 



Instead of

YearQuarter2 =
VAR Year = YEAR(output[Published Date])
VAR Quarter = QUARTER(output[Published Date])
VAR YearStart = MINX(ALL(output), YEAR(output[Published Date]))
VAR QuarterNumber = (Year - YearStart) * 4 + Quarter
RETURN QuarterNumber



I developed such a column and set the data type of this column to "whole number". This way I was able to sort. Thank you.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @huseyincenik_28 ,

 

Agree with @Ritaf1983 . Pls has your problem been solved? If so, please accept her reply. If not, please provide more details of the problem.

 

Best Regards,

Stephen Tao

Ritaf1983
Super User
Super User

Hi @huseyincenik_28 
To have the axis sorted chronologically by year_quarter, you need to have the column which have numeric value of combining year with the quarter :

year_quarter_sort = [Year]&[Quarter]
Ritaf1983_0-1721473498293.png

and then still in the data table, you need to sort the column year_column by the numeric column that was created:

 

Ritaf1983_1-1721473594023.png

Result :

Ritaf1983_2-1721473625981.png

More information about sorting by column is here :

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column?tabs=powerbi-deskto...

Sort on scatterplot here :

https://www.quicklylearnpowerbi.com/blog/sorting-a-scatter-plot-by-date-in-power-bi

PBIX with 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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

I did what you said and it did not solve my problem because the data contained duplicates.

huseyincenik_28_1-1721632737344.png

 



Instead of

YearQuarter2 =
VAR Year = YEAR(output[Published Date])
VAR Quarter = QUARTER(output[Published Date])
VAR YearStart = MINX(ALL(output), YEAR(output[Published Date]))
VAR QuarterNumber = (Year - YearStart) * 4 + Quarter
RETURN QuarterNumber



I developed such a column and set the data type of this column to "whole number". This way I was able to sort. Thank you.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors