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

Issues sorting quarters and year

Hi Everyone,

 

I hope you can help me with my problem. I'm creating a visual wherein the X- AXIS should be sorted like this :

 

Opport.png

 

Q1 2018 | Q2 2018 | Q3 2018 | Q4 2018 | Q1 2019 | Q2 2019 | Q3 2019 and so on

 

but whats happening is

 

Q1 2018 | Q1 2019 | Q2 2018 | Q2 2019 | Q3 2018 | Q3 2019 and so on

 

I have a date table and I sort by column the QUARTER column by MONTHYEAR(integer) but it causing an errorSortERror.png

 

DateTable

datetable.png

 

Thank you in advance! 🙂

 

1 ACCEPTED SOLUTION
judspud
Solution Supplier
Solution Supplier

Hi @Anonymous 

 

Try creating a column that is numerical as the year followed by the quarter

 

for example 2017 Q1 = 20171, 2017 Q2 = 20172....

 

One method could be 'QuarterOrder = [Year]*10 + [QuarterOfYear]'

 

You can then sort the Quarter column by the QuarterOrder column to create the correct order

 

Hope this helps

 

Thanks,

George

View solution in original post

2 REPLIES 2
judspud
Solution Supplier
Solution Supplier

Hi @Anonymous 

 

Try creating a column that is numerical as the year followed by the quarter

 

for example 2017 Q1 = 20171, 2017 Q2 = 20172....

 

One method could be 'QuarterOrder = [Year]*10 + [QuarterOfYear]'

 

You can then sort the Quarter column by the QuarterOrder column to create the correct order

 

Hope this helps

 

Thanks,

George

Anonymous
Not applicable

This solved my problem! Thank you @judspud !

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.