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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Sort year and month values chronologically in hierarchical date column

Hey i'm trying to roll up values at the level of a given month and year and show these on the x-axis of a line plot chronologically. In its current state of making the axis the year and month values and then drilling down by month, January 2021 comes before December 2020. This issue extends from the lineplot to the matrices on a seperate report page that also have year/month hierarchical date values as their columns. Has anyone encountered this and been able to overcome this? I've included some screenshots but it looks like I don't have permission to upload a .pbix file 

3.PNG4.PNG

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You need to use 'Expand all down one level in the hieraechy' to show the year and month at the same time.

1.png

Only go to the next hierarchy will just show the month hierachy which would ignore the year:

2.png

The hierarchy would not affect by the date slicer, please refer: Drill mode in a visual in Power BI 

 

Best Regards,
Community Support Team _ Yingjie Li
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

3 REPLIES 3
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You need to use 'Expand all down one level in the hieraechy' to show the year and month at the same time.

1.png

Only go to the next hierarchy will just show the month hierachy which would ignore the year:

2.png

The hierarchy would not affect by the date slicer, please refer: Drill mode in a visual in Power BI 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

parry2k
Super User
Super User

@Anonymous create your own hierarchy rather than using the in-built hierarchy and sort your month by another column. You can read my post here on date dimension and it talks about sorting.

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

xMikeDx
Frequent Visitor

sounds like you just need to have a sort order for your months. your sortorder column would be like year *100 + month. and highly likely you dont have any sorting issue but the level to which you are drilled on. you should use the fork drilldown to see both catagories in their associated years.

 

most likely you are returning multiple years so the months are highly likely running in that order.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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