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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Prakash1050
Helper III
Helper III

Matrix column in Reverse order

Hi All, 

 

I have one matrix visual. That matrix column have Month_Year_Format column from calender table in below snip.

 

Prakash1050_0-1728105888549.png


But, here that column is showing descending order. I need to change in ascending order.

It is possible? 

Please help me.

Thanks in Advance.

 

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @Prakash1050 
You need to sort the column of month year by its numeric value from the data view:

Ritaf1983_0-1728114914928.png

The logic of the year_month_code is year&month (just concatenate it and make it whole number data type)

Ritaf1983_1-1728115101224.png

P.S
If the sorting is currently in reverse order, it's highly likely that it’s being sorted based on a similar logic, but multiplied by negative one, which causes the order to go from largest to smallest. So, the column for sorting might already exist.

My pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

rajasaadk_98
Helper I
Helper I

To resolve the issue of the Month_Year_Format not showing in the correct order in your Power BI Matrix visual, follow these steps:1. Ensure Proper Sorting of Month_Year_Format Column:

The Month_Year_Format column might be sorting alphabetically (e.g., April before January) instead of by chronological order.

Steps to Fix:

Option 1: Sort by a Supporting Column

  1. Add a Month Index: In your calendar table, ensure you have a column that represents the month in numerical format or the year-month index. For example:

    • Month_Number (1 for January, 2 for February, etc.)
    • Or YearMonthIndex (e.g., 202301 for January 2023, 202302 for February 2023, etc.)
  2. Sort Month_Year_Format by this new column:

    • Go to the Data view in Power BI Desktop.
    • Select your Month_Year_Format column.
    • On the On the ribbon, click "Sort by Column" and choose your Month_Number or YearMonthIndex column.

View solution in original post

2 REPLIES 2
rajasaadk_98
Helper I
Helper I

To resolve the issue of the Month_Year_Format not showing in the correct order in your Power BI Matrix visual, follow these steps:1. Ensure Proper Sorting of Month_Year_Format Column:

The Month_Year_Format column might be sorting alphabetically (e.g., April before January) instead of by chronological order.

Steps to Fix:

Option 1: Sort by a Supporting Column

  1. Add a Month Index: In your calendar table, ensure you have a column that represents the month in numerical format or the year-month index. For example:

    • Month_Number (1 for January, 2 for February, etc.)
    • Or YearMonthIndex (e.g., 202301 for January 2023, 202302 for February 2023, etc.)
  2. Sort Month_Year_Format by this new column:

    • Go to the Data view in Power BI Desktop.
    • Select your Month_Year_Format column.
    • On the On the ribbon, click "Sort by Column" and choose your Month_Number or YearMonthIndex column.
Ritaf1983
Super User
Super User

Hi @Prakash1050 
You need to sort the column of month year by its numeric value from the data view:

Ritaf1983_0-1728114914928.png

The logic of the year_month_code is year&month (just concatenate it and make it whole number data type)

Ritaf1983_1-1728115101224.png

P.S
If the sorting is currently in reverse order, it's highly likely that it’s being sorted based on a similar logic, but multiplied by negative one, which causes the order to go from largest to smallest. So, the column for sorting might already exist.

My pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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 MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.