HOW TO SORT DATE COLUMNS LIKE A PRO IN POWERBI

Sorting date columns in Power BI involves arranging the dates in chronological order, either in ascending or descending order. To achieve this, the date column must be recognized as a date data type. If the column is formatted as text, it will be sorted alphabetically instead of chronologically. 

To do this,

  1. From the visual, there is an unsorted practice visual, starting from April 2024 – September 2024 with other months from 2013 coming in between the month-year axis.
  1. In order to sort this, you need to create another numeric format of the month and year column of your data.
  2. To do this, go to the table column by the side of Powerbi environment.
  1. Click on new column to add an extra column.
  1. In the formula bar of Powerbi, write a sort formula to sort the date ( 1. Sort = FORMAT(Date), “YYMM” ) and enter to get the numeric format.
  1. From the values displayed, using the first row, 13 represents the year and 09 represents the month. Same applies to the end.
  1. Click on the original column we are trying to sort (Month Year Full)
  1. On the top bar of PowerBi environment, click on sort by column
  1. A bar will appear, click on sort and the data is sorted
  1. Back to our graph, the problem has been resolved with the year starting from September 2013 to Dec 2014.

Leave a Reply

Your email address will not be published. Required fields are marked *