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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
salgouda
Frequent Visitor

DAX rolling 12 month sorting issue

Hi there,

I am trying to create a rolling 12 months visual here:

 

salgouda_0-1693430193534.png

 

 

but the sorting options are either by the turnover rate (which misses with the month order) or by the month number (which sorts past 12 months from jan to dec)

since this is the order that I need
Aug 1
Jul 2
June 3
May 4
April 5
Mar 6
Feb 7
Jan 8
Dec 9
Nov 10
Oct 9
sep 8

and I need this order to shift monthly according to each month

I created this calculated column

 

salgouda_1-1693430273118.png

 

 

but it clearly evaluates to blank for months sep, oct, nov, dec where months evaluate to (0,-1,-2,-3)

how can I work around this to get the right sort order for my visual?

Thanks in Advance!

4 REPLIES 4
technolog
Super User
Super User

I hope this message finds you well. I've noticed that this solution remain unresolved. If any of you have managed to find a resolution to the issue, I kindly request that you share your solution for the benefit of the entire community. Alternatively, if you're still facing challenges, please do let us know as well.

Your insights and updates will greatly assist others who might be encountering the same challenge.

@technolog what's the purpose of your message?  Please try to limit your contribution to either asking a clarifying question or providing a solution proposal (or - worst case - a personal opinion).

@salgouda If you haven't solved your problem, please try
https://blog.enterprisedna.co/sorting-date-table-columns-in-power-bi/

 

@lbendlinThank you for taking the time to respond. I understand the importance of clarity in our communications. My message stemmed from an observation that several solutions within our community have answers but they haven't been accepted or marked as resolved. This could possibly be because some contributors might have forgotten to provide feedback on the final outcome, leaving topics unresolved. My goal is to ensure that no solution remains in such a state.

I deeply wish for our community to remain vibrant and active. Abandoned solutions can give the impression of indifference. I'd like to emphasize the importance of feedback. When members, especially esteemed ones like yourself, take time out of their day to offer assistance, it's invaluable to receive updates or acknowledgment of proposed solutions. This not only recognizes the efforts of those trying to help but also builds a repository of resolved queries. The more feedback and results we share, the fewer repetitive questions we'll have, as most of them would have existing solutions to refer to.

Again, thank you for your guidance. I'll aim for more direct and concise communications in the future, keeping the betterment of our community at heart.

lbendlin
Super User
Super User

Use a YearMonth column for sorting.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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