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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
nafta90
New Member

Sort Chronologically MMM-YY Date

Hello, 

 

I have a month column in MMM-YY format over two years (Month = FORMAT('Actual (2)'[Date].[Date],"mmm-yy") and I have sorted by another column called FiscalMonth (FiscalMonth = (If( Month([Date]) >= 7 , Month([Date]) - 6,Month([Date]) + 6 )), which represents our fiscal calendar. When I create a viz though I get the months from both years in order and not the months from the first year first and then the second year's months.

 

Capture.PNG

Any ideas would be appreciated

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

Your sort column doesn't incorporate the year, so you need to do that.  You could consider the approach in this article with custom date strings - https://www.sqlbi.com/articles/creating-a-simpler-and-chart-friendly-date-table-in-power-bi/

 

Or you can make another FORMAT column with YYYYMM to get the yearmonths in order, and use this new column as your sort column.

 

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
mahoneypat
Employee
Employee

Your sort column doesn't incorporate the year, so you need to do that.  You could consider the approach in this article with custom date strings - https://www.sqlbi.com/articles/creating-a-simpler-and-chart-friendly-date-table-in-power-bi/

 

Or you can make another FORMAT column with YYYYMM to get the yearmonths in order, and use this new column as your sort column.

 

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


How can iget like below screen shot

vijaykumargade_0-1674322922566.png

 

Thank you for the help - it worked!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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