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
agd50
Helper V
Helper V

Year-month sort by?

agd50_0-1675748208448.png

I'm having an issue with the showing the right months and years with a year month column I made - 

Year-Month =
FORMAT('Calendar'[Date],"YY MMM")
(Syntax)^

How to get this to work correctly? (Years and months in the right place) Perhaps creating a secondary Year and month which has the sorting logic?

Kind Regards,
Andrew
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @agd50 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1675824018032.png

2. add a index column in Power Query Pane

vbinbinyumsft_1-1675824091405.png

vbinbinyumsft_2-1675824133507.png

3. add a new column with your dax formula, sort the new column by "Index" column

vbinbinyumsft_3-1675824342235.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @agd50 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1675824018032.png

2. add a index column in Power Query Pane

vbinbinyumsft_1-1675824091405.png

vbinbinyumsft_2-1675824133507.png

3. add a new column with your dax formula, sort the new column by "Index" column

vbinbinyumsft_3-1675824342235.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

FreemanZ
Super User
Super User

hi @agd50 

try like:

Year-Month =
FORMAT('Calendar'[Date],"YYYYMM")

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.