Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
heranaval
Regular Visitor

Nested column layout in a Power BI Matrix visual

How can I create a nested column layout in a Power BI Matrix visual with the following data structure?

 

I have the following data:

heranaval_0-1736913086836.png

 

I want to create a matrix where:

  • The rows are based on the "Code" column.
  • The columns are nested by:
    • Year (e.g., 2024),
    • Month (e.g., Jan, Feb, etc.),
    • Category (e.g., BTQ and DS) with nested columns for Price, Quantity, Amount (Price * Quantity), and Type.

The final layout should look like this:

heranaval_3-1736913571093.png

 

Can anyone help me to achieve this layout? Thank you!

3 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @heranaval 
Since in Power BI, the matrix is structured and does not allow for individual cell customization or merging options, the closest representation to what you provided in the image would be a tabular layout, with the category placed at the beginning, as shown in the image.

Ritaf1983_0-1736921893893.png

The pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

danextian
Super User
Super User

Hi @heranaval 

 

While the layout is fairly simple without the extra Type column, adding it complicates things. You'll need a disconnected table that includes all the necessary column and row combinations. Additionally, you should have a column for the dynamic format string (please search how to set this up) since those values will be formatted differently. Lastly, you'll need a measure that returns the correct values based on the row/column combinations. Also, it not possible to merge headers vertically such as the one above code and after Feb.  This is the closest I could get to - any more than this and you're looking into a premium custom viz like the matrix from inforiver .

danextian_0-1736923144482.png

Please refer to the attached pbix.

 

 

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

Anonymous
Not applicable

Hi @heranaval ,

 

Pls has your problem been solved? If so, accept the reply as a solution. This will make it easier for the future people to find the answer quickly.

If not, please provide a more detailed description, preferably some more virtual sample data, and the expected results.

 

Best Regards,

Stephen Tao

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @heranaval ,

 

Pls has your problem been solved? If so, accept the reply as a solution. This will make it easier for the future people to find the answer quickly.

If not, please provide a more detailed description, preferably some more virtual sample data, and the expected results.

 

Best Regards,

Stephen Tao

 

danextian
Super User
Super User

Hi @heranaval 

 

While the layout is fairly simple without the extra Type column, adding it complicates things. You'll need a disconnected table that includes all the necessary column and row combinations. Additionally, you should have a column for the dynamic format string (please search how to set this up) since those values will be formatted differently. Lastly, you'll need a measure that returns the correct values based on the row/column combinations. Also, it not possible to merge headers vertically such as the one above code and after Feb.  This is the closest I could get to - any more than this and you're looking into a premium custom viz like the matrix from inforiver .

danextian_0-1736923144482.png

Please refer to the attached pbix.

 

 

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thank you for your help!

Ritaf1983
Super User
Super User

Hi @heranaval 
Since in Power BI, the matrix is structured and does not allow for individual cell customization or merging options, the closest representation to what you provided in the image would be a tabular layout, with the category placed at the beginning, as shown in the image.

Ritaf1983_0-1736921893893.png

The pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you for your help!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.