Power BI sort table by Date

In this Power Bi tutorial, we will see how to sort a table by Date, Month, Year, and Month Year in chronological order in Power BI. And what are the different ways to sort the data table in Power Bi?

For this tutorial, I have used this  Financial Sample Excel file which you can download and use for making the Power BI report.

Power BI sort table by Date

Here we will see how to sort a data table by date in Power BI.

There are two ways that we can sort the data table by date value in Power Bi.

  • Using sort by column option
  • Sort ascending or descending order option

To achieve it, follow the below steps:

  • Open the Power BI Desktop, and load the financial data table using the Get data option. Once the data has been loaded select the data view.
  • In the data view, there are two ways that we can sort table by date.
  • Open the data view, and click on Column tools -> Sort by Columns -> Date.
  • Once you select the date column, it automatically sorts all the rows presented in the table based on the selected date column.
Power BI sort table by Date
Power BI sort table by Date
  • The second way is to display the date in chronological order by selecting the sort ascending order option as shown below:
  • For this, right-click on the date column and then click on Sort ascending if you want to sort in ascending order. In the same way, choose Sort descending, if you want to sort in descending order in Power BI.
Power BI sort table by Date example
Power BI sort table by Date example

This is how to sort data table by Date on the Power BI desktop.

See also  Power BI Table Conditional Formatting [With Examples]

Power BI sort table by month

Here we will see how to sort a data table by month in Power BI.

We can sort a table by month data table values in two different ways in Power Bi. They are,

  • Using sort by column option
  • Sort ascending or descending order option

To achieve it, follow the below steps:

  • To sort table by month in Power BI, we will use the same financial excel sheet, used in the previous topic:’Power BI sort table by date’.
  • Now select the data view in Power BI.
  • The first way is to select the month column and expand the sort-by-column -> Month Name, it automatically sorts all the rows presented in the table based on the selected month column.
Power BI sort table by month
Power BI sort table by month
  • Another way is to display the month in chronological order by selecting the sort ascending order option as displayed below.
  • For this, right-click on the Month name column -> Sort ascending option from the list in Power BI.
  • And if you want to sort by descending order, choose the Sort descending option.
Power BI sort table by month example
Power BI sort table by month example

This is how to sort table data by month in Power BI.

Power BI sort table by year

Here we will see how to sort table by year column in Power BI Desktop.

There are two ways that we can sort data table by year value in Power Bi. The two different options are,

  • Using sort by column option
  • Sort ascending or descending order option

Follow the below steps, to achieve it:

  • In the previous heading, as we discussed, load the financial data into the Power Bi desktop.
  • The first way in the data section is to select the year column in the table.
  • Click on the Column tools tab -> Sort by column – >Year column it automatically sorts all the rows presented in the table based on the selected year column.
Power BI sort table by year
Power BI sort table by year
  • The other way is to display the year in chronological order by selecting the sort ascending order option as like below:
  • For this, right-click on the Year column and choose the Sort ascending option from the list, In a similar way, if we want to sort the values in descending order, then choose the Sort descending option from the list.
Power BI sort table by year example
Power BI sort table by year example

This is an example of how to sort and display the year column in a data table in Power Bi.

See also  Power BI FREE vs PRO vs PREMIUM

Power BI sort table by month and year

Here we will see how we can sort the data table by month and year in Power BI.

It is possible to sort tables by month and year values in two different ways in Power Bi. They are,

  • Using sort by column option
  • Sort ascending or descending order option

To accomplish it, follow the below steps:

  • Here we use the financial data table, used in the previous topic to sort the table by month and year in Power BI
  • The first way is to select the month and year columns in the table.
  • Click on the Column tools tab -> Sort by column -> Month and Year it automatically sorts all the rows presented in the table based on the selected month and year column.
Power BI sort table by month and year
Power BI sort table by month and year
  • The second way is to display the month and year in chronological order by selecting the sort ascending order option as highlighted below:
  • For this right-click on the Month name column and click on the Sort ascending option from the list in Power BI. Select the sort descending option, if you want to sort by descending order.
Power BI sort table by month and year example
Power BI sort table by month and year example

This is how to sort a data table by month and year in Power BI.

In this Power BI tutorial, we have learned how to sort a table by Date, Month, Year-Month, and Year in Power BI in chronological order. Also, we discussed the two different ways to sort data tables in Power Bi.

You may lie the following Power BI tutorials:

>