Karen
Karen

Reputation: 55

Power BI Unable to select sort columns

I am creating a Month table to be included in my Power Bi Dashboard as a Filter.

I create a separate table joined to main table, but unable to select the option from the menu to Sort By Column- Greyed out.

What am I missing. I just want a filter of Months (Jan, Feb, Mar, etc) in numeric order. Can someone direct me to a good how to?

Upvotes: 5

Views: 11447

Answers (6)

momo
momo

Reputation: 31

When you create Report using Power bi data set (not connect directly to database) you cant use column sort it will appear disabled

Upvotes: 3

Rohit Agrawal
Rohit Agrawal

Reputation: 345

This is an old post, however, I was not able to solve based on above answers. So updating based on what helped me.

In Power query editor, create a new column in the same table as month number for corresponding month. Apply the changes and return to report screen.

Month Number Column

In report screen, select the field "Month", go to modelling and click sort by "Month Number". Note:- this makes Month to be sorted based on Month number rather than alphabetical.

Select Field Month

Sort by Month Number

Upvotes: 0

webdev5
webdev5

Reputation: 487

If a sort has already been specified, it will be greyed out.

  1. Click on the Data icon in the upper left.
  2. Click on the column that may have a sort on it.
  3. Click Clear Sort.
  4. Click on another column, then click back to the column you want to sort.
  5. Sort By Column will no longer be greyed out.

Upvotes: 1

Chris Koester
Chris Koester

Reputation: 522

The preferred way to do this is to use a sort by column that looks like this:

Month | MonthSort
Jan   |         1
Feb   |         2
Mar   |         3
Apr   |         4
May   |         5
Jun   |         6
Jul   |         7
Aug   |         8
Sep   |         9
Oct   |        10
Nov   |        11
Dec   |        12

Then on the modeling tab, select the Month column. Then click the Sort By Column button in the ribbon and select MonthSort.

https://learn.microsoft.com/en-us/power-bi/desktop-sort-by-column#sort-using-the-sort-by-column-button

Upvotes: 0

Casey H
Casey H

Reputation: 23

There's a cleaner way to do this. It's demonstrated starting at about 10:50 in this video.

https://youtu.be/d2bZpNZ6uIA?t=10m50s

You'll need to have a column of number values that correspond to the text values and then tell Power BI to sort by the number column. You can add such a column with "Enter Data" if it doesn't exist.

Upvotes: 0

Frostytheswimmer
Frostytheswimmer

Reputation: 718

Appending numbers to the beginning of your linked Month table might help you issue.

If your data looks something like this..

Revenue by month ID

enter image description here

Month table

enter image description here

Then make sure your month table is formtted like so in PBI

enter image description here

You can then filter like so

enter image description here

enter image description here

Alternatively, you could format the sorting month column to text and filter like so:

enter image description here

Upvotes: 0

Related Questions