Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
vinayvascuri
Frequent Visitor

Unable to sort month wise in waterfall chart

 

 

Need to sort month wise ? how to do ?

2 ACCEPTED SOLUTIONS
FarhanJeelani
Super User
Super User

Hi @vinayvascuri ,

To resolve the issue of sorting months in the correct order in your Power BI Waterfall chart, you need to ensure the "MonthName" field is sorted by a column representing the chronological order of months. Here’s how to fix it:

Steps to Fix the Sorting:

  1. Create a Sort Order Column:

    • Go to the data view in Power BI.
    • In the table containing the "MonthName" column, create a new column (e.g., "MonthOrder") using the following DAX formula:
      MonthOrder = MONTH(DATEVALUE("1 " & [MonthName]))
      This will assign a numeric value (1-12) to each month based on its chronological order.
  2. Sort "MonthName" by "MonthOrder":

    • Select the "MonthName" column in the Fields pane.
    • Go to the Column Tools tab on the ribbon.
    • Click on Sort by Column and select the "MonthOrder" column.
  3. Apply the Sorting to Your Chart:

    • Ensure the visual is using the "MonthName" field, which is now sorted in the correct chronological order.

Also it will be better if you will create a dimension calendar table and create a column for month name, month number , year . It will help to sort easily. 
Screenshot for example:

FarhanJeelani_0-1736451397564.png

 

Please mark this as solution if it helps you. Appreciate Kudos.

 

View solution in original post

v-yangliu-msft
Community Support
Community Support

Thanks for the reply from FarhanJeelani , please allow me to add some more information:
Hi  @vinayvascuri ,

 

As far as I know, Power BI's default sorting is based on alphabetical order, so using a directly created [Month] won't sort in normal month order, you can use the following two ways.

Way 1:

You can directly use Month in the date hierarchy, which will be sorted by month.

vyangliumsft_0-1736500908874.png

Please see the following link for an updated letter on the date hierarchy::

Auto date/time in Power BI Desktop - Power BI | Microsoft Learn

Way 2:

You can create a relational join with a date table with a month and a minimum date, set Sort by column.

1. Create calculated table.

Table 2 =
SUMMARIZE('Table',[Month],"mindate",MINX(FILTER(ALL('Table'),[Month]=EARLIER([Month])),[Date]))

2. Select [Month] – Column tools – Sort by column – [mindate].

vyangliumsft_1-1736500940195.png

3. Joining two tables.

vyangliumsft_2-1736500940196.png

4. Result:

vyangliumsft_3-1736500970869.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Thanks for the reply from FarhanJeelani , please allow me to add some more information:
Hi  @vinayvascuri ,

 

As far as I know, Power BI's default sorting is based on alphabetical order, so using a directly created [Month] won't sort in normal month order, you can use the following two ways.

Way 1:

You can directly use Month in the date hierarchy, which will be sorted by month.

vyangliumsft_0-1736500908874.png

Please see the following link for an updated letter on the date hierarchy::

Auto date/time in Power BI Desktop - Power BI | Microsoft Learn

Way 2:

You can create a relational join with a date table with a month and a minimum date, set Sort by column.

1. Create calculated table.

Table 2 =
SUMMARIZE('Table',[Month],"mindate",MINX(FILTER(ALL('Table'),[Month]=EARLIER([Month])),[Date]))

2. Select [Month] – Column tools – Sort by column – [mindate].

vyangliumsft_1-1736500940195.png

3. Joining two tables.

vyangliumsft_2-1736500940196.png

4. Result:

vyangliumsft_3-1736500970869.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

FarhanJeelani
Super User
Super User

Hi @vinayvascuri ,

To resolve the issue of sorting months in the correct order in your Power BI Waterfall chart, you need to ensure the "MonthName" field is sorted by a column representing the chronological order of months. Here’s how to fix it:

Steps to Fix the Sorting:

  1. Create a Sort Order Column:

    • Go to the data view in Power BI.
    • In the table containing the "MonthName" column, create a new column (e.g., "MonthOrder") using the following DAX formula:
      MonthOrder = MONTH(DATEVALUE("1 " & [MonthName]))
      This will assign a numeric value (1-12) to each month based on its chronological order.
  2. Sort "MonthName" by "MonthOrder":

    • Select the "MonthName" column in the Fields pane.
    • Go to the Column Tools tab on the ribbon.
    • Click on Sort by Column and select the "MonthOrder" column.
  3. Apply the Sorting to Your Chart:

    • Ensure the visual is using the "MonthName" field, which is now sorted in the correct chronological order.

Also it will be better if you will create a dimension calendar table and create a column for month name, month number , year . It will help to sort easily. 
Screenshot for example:

FarhanJeelani_0-1736451397564.png

 

Please mark this as solution if it helps you. Appreciate Kudos.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.