Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Month sort for multiple years data

Hello,

 

I have a requirement where I need to create a visualization by month in calendarized order   ( Jan, Feb, Mar etc) and grouped by year ( 2016, 2017). 

This seems simple to me in the begining but I could not make it work. I have attached the data, requirement and my Power BI visualization screen-prints. Any help will be appreciated.

 

Thanks,

Lakshay

 

  • Hi! i don't get very well what you want or whats the problem, im guessing it's the month sorting in the first chart?

     

    if that the case i recomend you adding a colun with a secuential from 1 to 12, something like the last 2 digits from the [Month YYYYMM] column

     

    You will end up with something like this:

     

    after that in the canvas just select the column month and then in the modeling tab select SortBy and chose the id_month just created as reference 

     

     

    with this the months will be sorted by the ids or the number of the month instead of A-Z sort of the names

     

    Hopes this helps

7 Replies

  • GeraSanz11's avatar
    GeraSanz11
    Frequent Visitor

    Hi! i don't get very well what you want or whats the problem, im guessing it's the month sorting in the first chart?

     

    if that the case i recomend you adding a colun with a secuential from 1 to 12, something like the last 2 digits from the [Month YYYYMM] column

     

    You will end up with something like this:

     

    after that in the canvas just select the column month and then in the modeling tab select SortBy and chose the id_month just created as reference 

     

     

    with this the months will be sorted by the ids or the number of the month instead of A-Z sort of the names

     

    Hopes this helps

  • Anonymous's avatar
    Anonymous
    Not applicable

    wrote:

    Hello,

     

    I have a requirement where I need to create a visualization by month in calendarized order   ( Jan, Feb, Mar etc) and grouped by year ( 2016, 2017). 

    This seems simple to me in the begining but I could not make it work. I have attached the data, requirement and my Power BI visualization screen-prints. Any help will be appreciated.

     

    Thanks,

    Lakshay

     



    wrote:

    Hello,

     

    I have a requirement where I need to create a visualization by month in calendarized order   ( Jan, Feb, Mar etc) and grouped by year ( 2016, 2017). 

    This seems simple to me in the begining but I could not make it work. I have attached the data, requirement and my Power BI visualization screen-prints. Any help will be appreciated.

     

    Thanks,

    Lakshay

     




    Hello,

     

    Thanks for the quick reply. What you have shown is exactly what I am trying to achieve. Unfortunately, when I try to sort based on ID Month, it does not do anything.  I don't know where the problem is. Can you please help?

    • GeraSanz11's avatar
      GeraSanz11
      Frequent Visitor

      just check the months ids are numeric format and not text since it will sort differently also if that doesnt solves the problem, please add a screenshot of the database in edit mode so i can figure it out

      • Anonymous's avatar
        Anonymous
        Not applicable

        The ID month column is numeric.  See below: