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
jalaomar
Helper IV
Helper IV

Calculate Margin when Sales and cost are in the same column

Hi all, 

 

I need help to calculate Margin, when I have both sales and cost in the same column.

 

I tried with the following measure, but no values are showing when I put the measure into a visual.

 

Margin = CALCULATE(
SUM('P&L'[05.2019]); 'P&L'[Account Grp 3] = "Net Equipment Sales")
-
CALCULATE(
SUM('P&L'[05.2019]); 'P&L'[Account Grp 3] = "Net Equipment Cost")
2 REPLIES 2
tex628
Community Champion
Community Champion

If you get nothing from that margin calculated i's leading me to believe that something is wrong with that account filter.

Start by creating seperate measures for sales and cost and make sure that they are working.

If you're getting nothing there, try calculating with the specific account instead of the groups. 

Let me know how it goes. 

/ J


Connect on LinkedIn

You were right, the specific account needed to be different.

Thanks for the input!

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors