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
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
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.