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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
newpbiuser01
Helper IV
Helper IV

Matrix Table Visual Breakdown/Drilldown by Column

Hello,

 

I have a question about splitting data in a matrix table visual. My data table contains spend and expense data for different managers across different years. 

newpbiuser01_0-1673369888434.png

 

I am trying to present it in a matrix plot shows the sales and expense numbers broken down by year as follows:

Project ManagerSalesExpense
 202020212022202020212022
Bob10001002000100
Mike004010000

 

However, when I try to do this in Power BI, I can't present the spend and expense numbers for different years side by side. I tried putting the Year field in the Columns field of the matrix visual and so it just shows year on the top and broken down to show spend and expense, whereas I need spend broken down by year and then expense broken down by year. This is what I get in Power BI currently:

newpbiuser01_1-1673369979625.png

I'd really appreciate any help!

1 ACCEPTED SOLUTION
Priya1969
Resolver I
Resolver I

1. Go to Power Query Editor, select expense and sales column, unpivot those columns.
2. Create a new table for replace the blank space in the Matrix.
*Home - select create newtable. Enter column name Project Mgr and their name.

 

Priya1969_0-1673500148845.png

3.Once you created a table, create a measure in the new table, using this formula
Measure = SUM(Sheet8[Value])+0

4. Then, form the matrix like below, you will get the desire output.

Priya1969_1-1673500229501.png

 

View solution in original post

4 REPLIES 4
Priya1969
Resolver I
Resolver I

1. Go to Power Query Editor, select expense and sales column, unpivot those columns.
2. Create a new table for replace the blank space in the Matrix.
*Home - select create newtable. Enter column name Project Mgr and their name.

 

Priya1969_0-1673500148845.png

3.Once you created a table, create a measure in the new table, using this formula
Measure = SUM(Sheet8[Value])+0

4. Then, form the matrix like below, you will get the desire output.

Priya1969_1-1673500229501.png

 

Thanks @Priya1969! worked like a charm 🙂

v-shex-msft
Community Support
Community Support

HI @newpbiuser01,

You can do unpivot column on sale and expense fields to convert them to ‘attribute’ and ‘value’, then you can use the ‘attribute’ on column field above the year and put the ‘value’ to matrix value field.

Unpivot columns - Power Query | Microsoft Learn

After these steps, these records will be group by 'project manager', 'attribute' type and 'year'.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
lbendlin
Super User
Super User

Either change  the value display to "Switch values to rows"  or use custom column headers.

 

lbendlin_0-1673487110793.png

lbendlin_1-1673487170572.png

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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