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
AbbasG
Memorable Member
Memorable Member

Calculating sales margin %

Hello All,

 

I have calculated the Sales margin value as below.

 

Sales Margin = SUM('Total Sales'[Total Sales Amount]) - (SUM(Cost[TCost]) + SUM(cog[Amount]))

 

cog = Cost of goods sold

Tcost = Total cost

 

I also want to calculate sales margin %. What would be the right query to achieve sales margin %?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AbbasG , Try like

Sales Margin %= divide(SUM('Total Sales'[Total Sales Amount]) - (SUM(Cost[TCost]) + SUM(cog[Amount]), SUM('Total Sales'[Total Sales Amount]) )  )

View solution in original post

2 REPLIES 2
AbbasG
Memorable Member
Memorable Member

@amitchandak thank you so much Amit.

amitchandak
Super User
Super User

@AbbasG , Try like

Sales Margin %= divide(SUM('Total Sales'[Total Sales Amount]) - (SUM(Cost[TCost]) + SUM(cog[Amount]), SUM('Total Sales'[Total Sales Amount]) )  )

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.