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
odraode_
Frequent Visitor

Date Table and Bar chart sorting

Hello to everyone,

I created a data table in my report since I want to follow PBI best practises but I have to say I don't see any benefits using it.

 

One of the issue is the following one: once created the data table, the date hierarchy disappear and even tough I created my own hierarchy it doesn't seem as powerful as the previous one. For example this is the bar chart with custom date hierarchy:

 

odraode__0-1685468616352.png

I couldn't find a way to sort it properly, while it was quite easy with the previous date hierarchy:

odraode__1-1685468751366.png

 

Can someone help me on sorting it out?

 

Thank you!

 

 

1 ACCEPTED SOLUTION

I upload an example pbix here: https://file.io/xuQARjwJTpIQ.

I'm unable to sort the bar chart below (using data table) while I can easily sort the one above (without using data table).

 

Thank you for your help!

View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

its really impossible to help you with what you have provided.  please can you share your pbix?  and can you show how you have set up your date table?  

 

also what are you expecting, why is one better than the other, please provide enough information to assist.  





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I upload an example pbix here: https://file.io/xuQARjwJTpIQ.

I'm unable to sort the bar chart below (using data table) while I can easily sort the one above (without using data table).

 

Thank you for your help!

hi there, the issue is that you are using the month name  column on the date hierarchy, but month name is a string, not a number, and so you have to tell power bi how to sort the month name .   

 

See file attached but what I did was on the month name column in the date 2 table i set the month name to use the month column to sort, so that it understood the order i expect, and that sorted the issue out. 

 

vanessafvg_0-1685557735149.png

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.