Forum Discussion

gmat's avatar
gmat
Icon for Helper I rankHelper I
2 years ago
Solved

Formatting Year Over Month in Matrix

I'm currently working on creating a reporting packet in Power BI, and I've encountered a formatting challenge that I hope someone can help me with.

 

I have set up a matrix with a hierarchy where the main column represents the year and the sub-columns represent the months within that year. However, I would like to adjust the formatting so that each month also displays the corresponding year it.

For example, instead of just seeing "May" I would like the top column header to also read 2023 instead of being blank. 

 

I understand that this is likely a formatting issue, but I'm unsure of the exact steps to achieve this desired layout. Any guidance or suggestions on how to accomplish this would be greatly appreciated.

 

 

 

 

  • Hi gmat ,

    You can sort of achieve this by adding a calcualted column of year with an extra space/s after the year based on the month number but take note that each year in the calculated column will have its owns subtotal if enabled each new being a distinct value.  Please see attached pbix for your reference

     

4 Replies

  • I think you're looking for an option to repeat the column headers? Unfortunately, that option isn't available for the Matrix visual (no clue why). 
    There's a few options - if it's for readability, you can consider turning on the vertical grid lines. Or you can try removing the heirarchy, and instead using a calculated column for month year value in the matrix. 

  • Hi gmat ,

    You can sort of achieve this by adding a calcualted column of year with an extra space/s after the year based on the month number but take note that each year in the calculated column will have its owns subtotal if enabled each new being a distinct value.  Please see attached pbix for your reference

     

    • gmat's avatar
      gmat
      Icon for Helper I rankHelper I

      This is very helpful. I imported your calendar table.. Do you know how to sort these so it is from oldest to newest.. April 2023 - March 2024

       

      • danextian's avatar
        danextian
        Icon for Super User rankSuper User

        I believe there is a YYYYMM column in there which can be used as a sort by column.