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