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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
vijayverma
New Member

How to sort month name in POWER BI direct query

Hi 

 

I want to display months in columns but its showing me in alphabatically sort order. I want to show in month wise sort order.

If anyone know please let me know how to do this. Note*: I am using direct query.

 

Thanks in advance.

header.png

12 REPLIES 12
edejes2
Advocate IV
Advocate IV

I got your solution here hope you like it https://youtu.be/n_gnuFS8qoY

Worked flawlessly, thanks.

edejes2
Advocate IV
Advocate IV

This is how far I got in getting the months in order using chilcleslicer, based on the fact that I am facing the same issue. 

I got the number to show in order from right to left but its braking in sep putting dec in the place of oct. 

image001.png

 

zivhimmel
Resolver I
Resolver I

I've never worked with direct query, but, are you able to use a "first day of month" column instead?

This will be of a date type, sorted correctly. And you can probably format it to show month and year.

 

@zivhimmel I have a date column , month number column and month name calculated column.

dtartaglia
Resolver I
Resolver I

Does your data have a column showing the month by number? May help if you can screen capture the columns of your data (non-sensitive data if possible).

Yes, I have number column as well.Untitled.png

 

but when i am using month name , I am not able to do monthwise sorting..

If you select the Month Name in your field list pane, then under the Modeling tab select 'Sort by Column'. You can chose to sort the name, by your month number field.  This should still work in Direct Query mode. 

@steph_io No in direct query "Sort by column" option is not there.

 

Thanks.

Sure it is. I'm using the June version of the Power BI Desktp. It's available from the Modeling tab of the desktop (not in power Query editor).  You have to select the field from the pane on the right, then the ribbon option becomes available.

 

Capture.PNG

@steph_io But in direct query "Sort by column" is disabled. Please refer the below screenshot.

 

1.png

 

Thanks.

I'm having the same issue, using a cube as my source.  Is there a solution for this problem?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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