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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Create a Matrix Table with multiple fields as rows

Hi,

 

I'm trying to re-create the below excel table in Power BI.  I believe it needs to be built as a matrix table but I'm struggling to get it built.

Capture.PNG

 

The table in excel has Employee, Member, Total Charges, Discount Amount, Employee Responsibility, Exclusions, Other Insuranance, Plan Payment and a Date field as columns.

 

However, I cannot get the table to be formatted with these fields as rows.  I'd like to use the Date column as the column and each field as a row.  Is there a combination of format settings I need to use?

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@Anonymous 

By the looks of your source table, you need to make the rows into columns and columns into rows to get this table:

PQ last.JPG

Once you have your data with this structure you can create measures and the visual you are looking for.

To tranform you source table, follow these instructions:

1) Select you "Paid" column and under the Transform tab, choose "unpivot other columns":

Unpivot 1.jpg

 

2) now select the "paid" column and choose pivot column with the options shown below:Pivot 2.jpgPivot 3.jpg

 

Now you have the structure you need. Create the measures for each field (column) and create a matrix with your month in the column bucket and the measures in the values bucket. 

 

Fields.JPG

 

Go into the formatting pane, and under values, choose "Show on Rows":Show rows.JPG

 

And you will get this result:

Result.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

5 REPLIES 5
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
PaulDBrown
Community Champion
Community Champion

@Anonymous 

By the looks of your source table, you need to make the rows into columns and columns into rows to get this table:

PQ last.JPG

Once you have your data with this structure you can create measures and the visual you are looking for.

To tranform you source table, follow these instructions:

1) Select you "Paid" column and under the Transform tab, choose "unpivot other columns":

Unpivot 1.jpg

 

2) now select the "paid" column and choose pivot column with the options shown below:Pivot 2.jpgPivot 3.jpg

 

Now you have the structure you need. Create the measures for each field (column) and create a matrix with your month in the column bucket and the measures in the values bucket. 

 

Fields.JPG

 

Go into the formatting pane, and under values, choose "Show on Rows":Show rows.JPG

 

And you will get this result:

Result.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

One problem I'm running into when unpivoting is that not all fields (rows) once unpivoted are not the same data types.  Some are dollar types while others are Member Numbers.  So, if I want to list Total Paid Dollars but also Count the number of Members...how do you do that when unpivoting?

 

Is that possible?

parry2k
Super User
Super User

@Anonymous you need to unpivot your data to achieve this, select date column in power query, right click, and choose unpivot other columns, you will get two column attribute and value, attribute will be your column header,

 

now in matrix, you can attribute on rows, date on columns, and value column on values section.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I have tested on my side, but not reproduce the issue.

Could you try to update the latest version powerbi desktop and try it again? If possible, could you please share this sample pbix file for us have a test?

Of course, recreate this pbix file is a good way that you could try.

here are some simple way you could refer to:

Step1:

Open power bi desktop, the copy all the query in advanced editor of old pbix file and reuse in new report as below:

Note: the query name is same with old pbix.

Step2:

If you had created calculate measure of column in old pbix, just copy the formula and recreate them.

Step3:

Now you could copy and paste visuals from old report to new report.

 

I hope these steps on helps you with your Power BI service.

Regards,

Lewis

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.