cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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).

Highlighted

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

 

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

Highlighted

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. 

Highlighted

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

 

Thanks.

Highlighted
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.

 

Highlighted

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

Highlighted

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

Highlighted

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

 

1.png

 

Thanks.

Highlighted

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors