The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
When I add quarter date to the x axis in the scatter chart, I cannot sort on the axis.(Picture 1)
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.
Picture 2
Solved! Go to Solution.
I did what you said and it did not solve my problem because the data contained duplicates.
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.
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
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 :
and then still in the data table, you need to sort the column year_column by the numeric column that was created:
Result :
More information about sorting by column is here :
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
I did what you said and it did not solve my problem because the data contained duplicates.
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.