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
Mana_786
Frequent Visitor

Gross Margin

Hi Dear All,

I hope some body can guide me properly .I have a probelm to get figures from Gross margin in Power BI.

My Data type is somehow like this.

 

Branch No          Branch Name     Area         Entity       month    Year          sales          GM          GM%(GM/Sales)

  01                      A                      A               S             1            2017       3000         1000         33%

  02                      B                       A               T              1           2017       2000          1000         50%

 

So like in this formate I have data in excel sheet . I have data for 10 month for more then 50 Branches .So the main problem is this after importing data in Power BI I want to have gross margin calculation .When I want to have Gross margin for Araea A It give totaly wrong result In Card Diagram . Normaly It should calculate Gross margin from arae A or (branch   1+2) and divded into sales from Area A or(Branche 1+2). But actualy in card diagram it gives average from this result mean it just devided by 2 as normal.

I would like to have a proper detail if somebody can give .

Thanks in Advance

 

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @Mana_786,

You need to create a measure to calculate the total Gross margin using the formula below.

GM percentage = DIVIDE(SUM(Table1[GM]),SUM(Table1[Sales]))


Please see the expected result, 40%=(1000+1000)/(3000+2000).

1.PNG

Best Regards,
Angelia

View solution in original post

3 REPLIES 3
v-huizhn-msft
Employee
Employee

Hi @Mana_786,

You need to create a measure to calculate the total Gross margin using the formula below.

GM percentage = DIVIDE(SUM(Table1[GM]),SUM(Table1[Sales]))


Please see the expected result, 40%=(1000+1000)/(3000+2000).

1.PNG

Best Regards,
Angelia

In this solution there are a problem. If we have costs but revenue are 0, this formula return blank or optional value for zero division exception. I think that the real %profit must be " -100%"

Thank you very much that work well.

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.