Forum Discussion

odraode_'s avatar
odraode_
Frequent Visitor
3 years ago
Solved

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:

 

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

 

Can someone help me on sorting it out?

 

Thank you!

 

 

  • odraode_'s avatar
    odraode_
    3 years ago

    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!

3 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    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.  

    • odraode_'s avatar
      odraode_
      Frequent Visitor

      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!

      • vanessafvg's avatar
        vanessafvg
        Community Champion

        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.