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
Yuiitsu
Helper V
Helper V

Calculating Margin %

Dear Experts

 

I am new with Power BI so I really need help here. Forgive me if this had been answered somewhere else but I cannot seem to find a solution around.

 

I want to create a graph to show the total profit margin for individual customer.

Here is an example of my file

 

Customer NameTotal Selling Profit

Margin %
AAA      1,288           85166%
BBB         121            4437%
CCC           88            3438%
CCC           32            1030%
CCC           11              330%
CCC         154            4630%
DDD           10              223%
DDD           13              2

13%

 

However when it comes out in the graph here is what it looks like

 

graph.PNG

 

 

I have changed the column type to % but it doesnt show as % in my graph. Also the number is wrong so perhaps it added up all my margin together?

 

Please help me to solve this. I hope my request is clear enough to understand.

If there is any information I can provide please let me know!

 

1 ACCEPTED SOLUTION

Hi @Yuiitsu ,

 

One custmer may have multi margins%, so if we sum them, we may got a 38%+30%+30% for customer C, if you want to get the result (3+10+34)/(11+32+88)=35.8%, we can create a measure as the value fileld to meet your requirement:

 

Margin % Measure =
DIVIDE ( SUM ( 'Table'[Profit] ), SUM ( 'Table'[Total Selling] ) )


Best regards,

 

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
EricHulshof
Solution Sage
Solution Sage

You want to save a percentage as a decimal and then label it as percentage in modelling tab. 0,66 = 66%. The way you have it now is 66% = 6600% (66*100).

Im not sure whats going on in your visual, but i advice you to change this first and then take a look at the visual. If its still not working please post the setup of the visual, what fields are where on what aggregation etc.

 


Quality over Quantity


Did I answer your question? Mark my post as a solution!


tempsnip.gifIs this what you meant?

Thanks for your reply earlier!

 

Yes, thankyou, in the value field you see count of margin, this should be set to dont summarize. Also, did you chance the data to 0,66 instead of 66%?

 


Quality over Quantity


Did I answer your question? Mark my post as a solution!


Thank you for your kind reply. Please take a look at my screenshot

 

margin.JPG

should I change to 2 decimal place? If yes please guide me the steps.

Also for the margin, as you can see in the SS i set it to dont summarize.

Capture.JPGCaptured.JPG

The drop down doesnt have that option. Am I misunderstanding anything here?

 

Again thank you for your help!

 

Hi @Yuiitsu ,

 

One custmer may have multi margins%, so if we sum them, we may got a 38%+30%+30% for customer C, if you want to get the result (3+10+34)/(11+32+88)=35.8%, we can create a measure as the value fileld to meet your requirement:

 

Margin % Measure =
DIVIDE ( SUM ( 'Table'[Profit] ), SUM ( 'Table'[Total Selling] ) )


Best regards,

 

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you very much!

 

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.