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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.