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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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