Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi All,
I have an issue while making a compertive statement in Power BI.
Below is my raw financial data
When I make a compariive statement in Power Bi using Power BI using matrix visualization I get the below view
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
Solved! Go to 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
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.
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
It should be in this format
But in Power BI
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 82 | |
| 48 | |
| 36 | |
| 31 | |
| 29 |