Forum Discussion

MarleyChambers2's avatar
MarleyChambers2
New Member
7 months ago
Solved

Rearranging score group order

Hi,

 

I would really appreciate it if someoe could let me know how I can rearrange the order of a score group on a 100% clustered bar chart. It is currently in the incorrect order. I also need help rearranging the quarters on the x-axis in order to line up over time. Right now, I have quarters from 2024 next to some from 2022. 

 

Thank you, 

 

Marley 

  • Hi MarleyChambers2,

     

    To rearrange score group order in your Power BI 100% clustered bar chart legend, create a custom sort column like Score Sort = SWITCH([ScoreGroup], "Low", 1, "Medium", 2, "High", 3) and sort the ScoreGroup field by it. For quarters on the x-axis to align chronologically (fixing 2024 next to 2022), add a sort key like Quarter Sort = YEAR([Date])*10 + QUARTER([Date]) (e.g., 20241 for 2024 Q1), then sort Quarter field by this column.

     

    If you share your model / visual I can provide a better example.

     

    If this has helped please feel free to mark it as a solution and give kudos 👍

2 Replies

  • Hi MarleyChambers2,

     

    To rearrange score group order in your Power BI 100% clustered bar chart legend, create a custom sort column like Score Sort = SWITCH([ScoreGroup], "Low", 1, "Medium", 2, "High", 3) and sort the ScoreGroup field by it. For quarters on the x-axis to align chronologically (fixing 2024 next to 2022), add a sort key like Quarter Sort = YEAR([Date])*10 + QUARTER([Date]) (e.g., 20241 for 2024 Q1), then sort Quarter field by this column.

     

    If you share your model / visual I can provide a better example.

     

    If this has helped please feel free to mark it as a solution and give kudos 👍

    • MarleyChambers2's avatar
      MarleyChambers2
      New Member

      Hi Mattia, 

       

      Thanks so much for your help with this! I will give this a go, and let you know how it goes. 

       

      All the best, 

       

      Marley