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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
U156531
Helper V
Helper V

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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