Forum Discussion

shaunb94's avatar
shaunb94
Helper I
3 years ago
Solved

Sorting in a Matrix using another column.

Hi, 

I have the below matrix but I am having issues sorting it the way that the user has required. 

I want the matrix to show the 6 months of revenue first then the 6 months of billing rather than side by side so I know I need to sort on something other than month.

 

The solution should look similar the pivot table below, but instead of having 'HRS weighted' & 'HRS', I would have Revenue & Billing. Does anyone know how to do this in Power BI? I have briefly tried calculation groups already but can't seem to work it out yet.

MATRIX:

 

PIVOT TABLE:

 

Any help would be greatly appreciated. 

 

Thanks,

Shaun

2 Replies

  • DOLEARY85's avatar
    DOLEARY85
    Resident Rockstar

    Hi,

     

    you'll need to create a new table with the sorting order for you columns and then use sort by in the column tools to adjust it to that order. I wrote a blog which includes how to do this, check out: https://github.com/DOLEARY85/Power-BI-Replicate-Excel-Table

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

     

    • shaunb94's avatar
      shaunb94
      Helper I

      Thanks so much, I didn't actually need to do anything with the sorting. Duplicating & Unpivoting did the trick by itself. 

       

      Great Blog Post 🙂