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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

what is the easiest/ most efficient way to create variance for different rows?

I would like to create variance but my data stored in rows instead of columns. previously  in Ms Excel was easy to create a pivot and make a calculation using different column.

 

in PowerBI I have 1 row for revenue and 1 row for cost. I would like to create the margin using the revenue-cost formula, but im not aware what would be the easiest and calc view the fastest way to create it? where should I look at it?

 

please note:

Im a rookie in PowerBI

 

2 REPLIES 2
ibarrau
Super User
Super User

Hi. I don't think you should work like that at all. You can transform your data in Power Bi to work with columns instead of rows because power bi works with columns.

Try unpivot like this post showing both actions:

https://databear.com/power-bi-pivot-and-unpivot-columns/

 

Then you can work with columns again. I don't recommend working with rows.

Regards,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

az38
Community Champion
Community Champion

Hi @Anonymous 

there are Pivot and Unpivot functions in Power Query Editor mode 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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