Forum Discussion

mitchryan8's avatar
mitchryan8
Frequent Visitor
2 years ago
Solved

Power BI Dates Grouping Individually

I have a date column that I pull in from a view in Azure Databricks. I want it formatted 'Jan 2024' so I formatted it MMM YYYY in the format box. But this is causing all the dates to group individually. All the Jan 2024s aren't rolling up together, they stay separate:

 

Does anyone know how to fix this? It is making my line graphs look insane.

  • That's why TDFecha is useful, you create a month number column and use the sort by Column tool, sorting YEAR_MONTH by Month(In number).

    Recommendation, since you have several values in a month for the same value in YEAR_MONTH, what I do is filter specific days from Power Query, so that there is a 1 - 1 relationship, like the following example.

    Then you sort it by...

    In case it gives you an error, save your changes, close the file, and try again.

    If this publication help , considering accept it as the solution to help other members find it more quickly.

4 Replies

  • Why not work with a calendar dimension table and make your modifications to this table according to your need?

    Give it a try and comment on how it went.

    • mitchryan8's avatar
      mitchryan8
      Frequent Visitor

      That "works" in the sense that they do group together. But the column is not longer in Date format, once you use the FORMAT function it turns it into TEXT. And then it doesn't sort in order so kind of defeats the whole purpose

      • Syndicate_Admin's avatar
        Syndicate_Admin
        Administrator

        That's why TDFecha is useful, you create a month number column and use the sort by Column tool, sorting YEAR_MONTH by Month(In number).

        Recommendation, since you have several values in a month for the same value in YEAR_MONTH, what I do is filter specific days from Power Query, so that there is a 1 - 1 relationship, like the following example.

        Then you sort it by...

        In case it gives you an error, save your changes, close the file, and try again.

        If this publication help , considering accept it as the solution to help other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mitchryan8 ,

    Is your problem solved, and if so, please mark the answer you think is correct as solution.

    Best Regards,

    Xianda Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.