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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
baronraghu
Helper III
Helper III

Summary in Column label instead of Row Labels in Matrix

Hi All,

 

I have an issue while making a compertive statement in Power BI.

 

Below is my raw financial data

Raw Data.PNG

 

 

 

When I make a compariive statement in Power Bi using Power BI using matrix visualization I get the below view

matrix PBI.PNG

Insted of this format I would like the Years to be on column Headers while financial parameters on Row label so its easy to compare YoY.

 

Look forward for your reply

 

1 ACCEPTED SOLUTION

Hi Herbert,

 

Thanks for your reply.

 

I forgot to mention that all the parameters are measures which has been obtained using some calculation.

 

I found an alernative way of using Switch function.

 

I created a new table with all the parmeter and order numbers, like below

Revenue 1

COGS 2

EBITDA 3

Debt 4

Equity 5

 

i then found the maximum value of the order series - Max Order= Max(order_series)

 then i used  the following function Category Order-  if(hasonevalue(order_series),switch(Max Order,1,Format(Revenue,$0,000),2, COGS,3,EBITDA) and so on

 

This way I placed the cateorgy in row header and Category Order in value and was able to bring the categories to rows  and show up the desired result.

 

Hope this helps.

 

Please let me know if you have any doubts regarding my solution or a better approach.

 

Thanks

 

View solution in original post

3 REPLIES 3
v-haibl-msft
Microsoft Employee
Microsoft Employee

@baronraghu

 

You can select all the column except the Year column and click "Unpivot Column" in Query Editor. Then rename the "Year" column name to "Year_1", "Attribute" to "Year".

For details, please refer to the attached PBIX file.

 

Summary in Column label instead of Row Labels in Matrix_1.jpg

 

Best Regards,
Herbert

 

 

Hi Herbert,

 

Thanks for your reply.

 

I forgot to mention that all the parameters are measures which has been obtained using some calculation.

 

I found an alernative way of using Switch function.

 

I created a new table with all the parmeter and order numbers, like below

Revenue 1

COGS 2

EBITDA 3

Debt 4

Equity 5

 

i then found the maximum value of the order series - Max Order= Max(order_series)

 then i used  the following function Category Order-  if(hasonevalue(order_series),switch(Max Order,1,Format(Revenue,$0,000),2, COGS,3,EBITDA) and so on

 

This way I placed the cateorgy in row header and Category Order in value and was able to bring the categories to rows  and show up the desired result.

 

Hope this helps.

 

Please let me know if you have any doubts regarding my solution or a better approach.

 

Thanks

 

baronraghu
Helper III
Helper III

It should be in this format

 

solution.PNG

But in Power BI

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors