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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
U156531
Post Patron
Post Patron

Need help sorting a slicer with months

I need help sorting these months in the slicer below. The column in the slicer is MTDwithcur. I'm trying to use the Sorting column in the table below. Thanks.

 

U156531_0-1727701384463.png

 

U156531_1-1727701557852.png

 

 

1 ACCEPTED SOLUTION
audreygerred
Super User
Super User

Hello! In the data pane, select the field that needs to be sorted (in your case MTDwithcur) and then in the ribbon along the top find the Column Tools tab and then select Sort by column in that and select the column to want to sort by (which for you is Sorting). This will make MTDwithcur sort by Sorting.

 

Sort one column by another column in Power BI - Power BI | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Your sorting measure is not returning what you are wanting.

jdbuchanan71_0-1727703131023.png

Try it like this.

Sorting =
VAR DateYear = YEAR([Date])
VAR DateMonth = MONTH([Date])
RETURN DateYear * 100 + DateMonth
audreygerred
Super User
Super User

Hello! In the data pane, select the field that needs to be sorted (in your case MTDwithcur) and then in the ribbon along the top find the Column Tools tab and then select Sort by column in that and select the column to want to sort by (which for you is Sorting). This will make MTDwithcur sort by Sorting.

 

Sort one column by another column in Power BI - Power BI | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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