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
Anonymous
Not applicable

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
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