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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bcastillo
Frequent Visitor

Issues sorting quarters and year

Hello,

 

I am having issues sorting the x-axis data on a line chart in order, when I try to convert the column for quarterly data I receive an error message.

 

example2.PNG    

 

 

 

examples.PNG

 

 

 

 

screenshot2.PNG

1 ACCEPTED SOLUTION
edhans
Super User
Super User

Add a new field to your date table that would be numeric data. 201801, 201802, 201803, etc. for the quarters. Then have simlar text field in your date table that would convert to text, so it shows as you have it - Q2-17, Q3-17, etc.

 

Now use the new text string of quarters (q2-17) in your visuals, then in the modeling tab and use the SORT BY feature, sort those by the numeric quarter numbers above (201801, 201802, etc).  That is easiest to do in the table view.image.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

4 REPLIES 4
edhans
Super User
Super User

Add a new field to your date table that would be numeric data. 201801, 201802, 201803, etc. for the quarters. Then have simlar text field in your date table that would convert to text, so it shows as you have it - Q2-17, Q3-17, etc.

 

Now use the new text string of quarters (q2-17) in your visuals, then in the modeling tab and use the SORT BY feature, sort those by the numeric quarter numbers above (201801, 201802, etc).  That is easiest to do in the table view.image.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Wow. Finally got perfect solution.

IT WORKED! Thank you!

Excellent!



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.