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.
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
Solved! Go to Solution.
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).
Best Regards,
Angelia
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).
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
93 | |
82 | |
70 | |
64 |
User | Count |
---|---|
116 | |
106 | |
94 | |
79 | |
72 |