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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
TLW_STL
Helper I
Helper I

How To Sort Matrix Columns When Using Calculated Column?

I created a matrix, using a calculated column.  The data displayed is correct, but I'd rather that my columns sort in the opposite direction. 

 

In the screen shot below, I show the calculated column.  Is there a way that I can change the calculation to sort data from left to right?  If not, should I create another column using INDEX?  Or maybe RANKX?  

 

I also have a link to a similar file saved to OneDrive, in case someone wants to review.

 

Thanks for any suggestions!

 

Screen shot 1.jpg

 

https://onedrive.live.com/?cid=7E43163E8AB99B59&id=7E43163E8AB99B59%21955&parId=7E43163E8AB99B59%211...

 

1 REPLY 1
vicky_
Super User
Super User

vicky__0-1692139334488.png

you will need to create a custom sort column for your months, and thn go to Column tools > Sort by Column > [your calculated column].

I used the following DAX in my calculated column:

month sort = RANKX('Table', 'Table'[Month], , DESC)

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors