How to Sort Month Names in Power BI Slicer?

I recently worked on a Power BI report where sorting month names in a Power BI slicer helped me easily navigate and select specific months chronologically.

This Power BI tutorial will teach us how to sort month names in Power BI Slicer in ascending or descending order. Also, I will explain to you how to sort Power BI Slicer by quarter name.

Moreover, we will discuss how to sort months in chronological order in Power BI Slicer with some simple scenarios.

How to Sort Month Names in Power BI Slicer

Sorting month names in a Power BI slicer can be helpful for organizing data in chronological order. Now, let’s see how to sort month names in a Power BI slicer.

Scenario:

You have sales data for different months. Sorting the months in the slicer allows you to easily select and analyze data for specific months, making it simpler to understand trends and patterns over time.

According to this scenario, we have a SharePoint list named Financial Sample that contains the following columns with various data types:

ColumnsData Types
Month NameSingle line of text
SegmentSingle line of text
CountrySingle line of text
ProductSingle line of text
SalesCurrency
ProfitCurrency
How to Sort Slicer in Power BI

Follow the below steps to sort month names in the Power BI slicer:

1. Open Power BI Desktop and load data using the Get data option. Then, we can see the data set in the Data Panel.

sort month slicer in power bi

2. Under the Home tab, expand Visual gallery (black box) -> Click the Slicer visual.

power bi slicer sort months in order

3. Then, use the +Add data option to add the Month Name into the Field.

How to Sort Month Names in Power BI Slicer

4. Select the slicer and select the three dots () in the top right corner -> click Sort axis -> click Sort descending.

slicer sort months order in power bi

This way, you can sort the months in descending/ascending order in a Power BI slicer.

Power BI Sort Month Name Chronologically in Slicer

Now, let’s see how to sort months in chronological order in the Power BI slicer.

Scenario:

You are analyzing sales data in Power BI and want to use a slicer to filter sales by month. By sorting the month names chronologically in the slicer, you can help users quickly find and select specific months, making it easier to track sales trends over time.

How to Sort Months in Chronological order in Power BI Slicer

I hope you have loaded the data and are ready to follow the steps below to sort month names chronologically in a Power BI slicer.

To sort month names chronologically in a Power BI slicer, we’ll need to arrange custom orders within the Power BI slicer. To do this, follow the below steps:

1. Under the Home tab, click Enter data.

sort months chronologically in Power BI Slicer

2. After that, you will see a window (Create Table) where you can use the ‘+’ symbols to add new columns and rows. Next, input the data into the table. Once you’ve added the necessary data, give a name to the table (Custom List), and finally, click on the “Load” button.

How to sort months chronologically in Power BI

3. After that, go to Table view -> Select Month column -> Click on Sort by column from the top ribbon -> Select Month Number.

rearrange month names in a slicer

4. Click on Model view -> Manage relationships from the top ribbon.

how to custom sort slicer in power bi

5. In the “Create relationship” dialog box, select the original table and choose the column you want to sort, which in my case is Month Name. Ensure the “Cardinality” is set to Many to One, then click OK.

custom sort slicer in power bi

6. Goto Repoet view, under the Home tab, expand Visual gallery (black box) -> Click the Slicer visual.

power bi slicer sort months in order

7. Then, use the +Add data option to add the Month into the Field. Check the screenshot below.

Sort a Column with a Custom Order in Power BI

8. After that, the month name is sorted chronologically in the Power BI slicer.

Power BI Sort Month Name Chronologically in Slicer

This way, you can easily sort chronologically in the Power BI slicer.

Power BI Sort Slicer By Quarter Name

Here, I will demonstrate how to sort the slicer by quarter name in Power BI.

Power BI Desktop Sort Slicer By Quarter Name

For this example, we have a SharePoint list named Employee Leave List that contains the following columns with various data types:

ColumnsData Types
EmployeeIDNumber
EmployeeNameSingle line of text
LeaveTypeSingle line of text
StartDateDate and time
EndDateDate and time
DurationNumber
StatusSingle line of text
Display and sort slicer quarter name in power BI

Follow the below steps to sort the slicer by quarter name in Power BI

1. Open Power BI Desktop and load data using the Get data option. Then, we can see the data set in the Data Panel.

power bi slicer sort quarter descending

2. Under the Home tab, expand Visual gallery (black box) -> Click the Slicer visual. Then, use the +Add data option to add the StartDate into the Field.

power bi slicer sort quarter

If you observe, the quarter name is not present in the dataset. Therefore, we’ll create a calculated new column that calculates the quarter name, and then we’ll sort this quarter name.

3. Select Table view -> Click New column.

Power BI Date Slicer by quarter

4. Then, in the formula bar, input the following formula:

QuarterName = 'Employee Leave List'[StartDate].[Quarter]

Where:

  • QuarterName = This is the name given to a new column we create in our dataset.
  • Employee Leave List‘ = This refers to the table from which we are retrieving the data.
  • [StartDate] = This refers to a column in our dataset.
  • [Quarter] = It calculates the quarter for each date in the “StartDate” column and stores it in the new “QuarterName” column.
Power BI Slicer sort by quarter

5. Under the Home tab, expand Visual gallery (black box) -> Click the Slicer visual. Then, use the +Add data option to add the QuarterName into the Field.

Power BI Sort Slicer By Quarter Name

6. To sort the quarter, select the Slicer -> Click 3 dots(…) -> Sot axis -> Sort descending

Display And Sort A Slicer Control By Month Or Quarter Name

This method allows you to sort the slicer by quarter name in Power BI.

Conclusion

This article helps you to sort in a Power BI slicer, which can be helpful for organizing data order.

This article covered how to sort month names in a Power BI slicer and arrange them chronologically. Additionally, we learned how to sort a slicer by quarter name in Power BI.

Moreover, you may like some more Power BI tutorials: