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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Displaced_2000
Frequent Visitor

date created by measure and sorting

If have created a measure which adds varying amount of months to a date (a date from a column) using EDATE().  The months added vary on multiple criteria so the resulting dates do not follow the original cronology. 

 

When I have the date formatted as standard (dd/mm/yy) I can sort this easily either ascending or decending.  But I want to format the date as mm/yy and to do this i am using FORMAT() but this then sorts all months together regardless of year.

 

Is there a solution to this?

 

 

3 REPLIES 3
Displaced_2000
Frequent Visitor

Hi @JoeBarry Many thanks

 

The mm/yy is not a column but created by a measure, does this make a difference.  I cant see any way to order a measure used in a table visual by any other column?

Ah good question, 

 

my idea was when a column existed. Is it possible to change your measure to yy/mm ? It should sort this way

JoeBarry
Solution Sage
Solution Sage

Hi @Displaced_2000 

 

Create another column like this 

 

Month Index = Format('DIM Date'[Date], "YYMM")

 

 convert to number and sort the mm/yy column by the new Month Index column

 

That should do the trick

Joe

 

If this post helps, then please Accept it as the solution

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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