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
Anonymous
Not applicable

Product contribution from overall sales

Hi,

I have product and Sales and wanted to calculate how much % is occupying by each product from overall sales.

 

Sum(Sales)/Total(Sales) as example given below.

 

ProductSalesExpected output
A1306.388206388
B33216.31449631
C32115.77395577
D34216.80589681
E91044.71744472

 

Thanks,

Thimma

3 ACCEPTED SOLUTIONS
jahida
Impactful Individual
Impactful Individual

MEASURE = 100 * DIVIDE(SUM('Table'[Sales]), CALCULATE(SUM('Table'[Sales]), ALL('Table'[Product])))

 

Give that a try.

View solution in original post

v-sihou-msft
Employee
Employee

@Anonymous

 

Either using calculated column or measure can get expected result. Please refer to formulas below:

 

Calculated Column:

Column = DIVIDE(Table10[Sales],SUM(Table10[Sales]))*100

Capture00.PNG

Measure:

Pct Of Total = DIVIDE(SUM(Table10[Sales]),CALCULATE(SUM(Table10[Sales]),ALL(Table10[Product])))*100

Capture01.PNG

View solution in original post

Power BI has introduced new feature in May release where Power BI clacuate this its own for you. Please refer to below steps.

 

I have sales measure and being show as stacked chart. Please refer to below image.

 

sales.png

 

Now right click on Sales measure in visual propertise, following menue will be visible and you have option for "Quick Calc"

 

rightclick.png

 

While clicking on Quck Calc you can see below option for calcuations and you can select % of Grand Total.

 

 

precentabe.png

 

This will conver your all measurs to % of your total sales and it will work on all filters as well.

 

 

final.png

you can see that y axis and tool tip has been changed to new values and each region is having % value as compared to total.

 

 

View solution in original post

4 REPLIES 4
123abc
Community Champion
Community Champion

issue sloved. .... cont.% 

v-sihou-msft
Employee
Employee

@Anonymous

 

Either using calculated column or measure can get expected result. Please refer to formulas below:

 

Calculated Column:

Column = DIVIDE(Table10[Sales],SUM(Table10[Sales]))*100

Capture00.PNG

Measure:

Pct Of Total = DIVIDE(SUM(Table10[Sales]),CALCULATE(SUM(Table10[Sales]),ALL(Table10[Product])))*100

Capture01.PNG

Power BI has introduced new feature in May release where Power BI clacuate this its own for you. Please refer to below steps.

 

I have sales measure and being show as stacked chart. Please refer to below image.

 

sales.png

 

Now right click on Sales measure in visual propertise, following menue will be visible and you have option for "Quick Calc"

 

rightclick.png

 

While clicking on Quck Calc you can see below option for calcuations and you can select % of Grand Total.

 

 

precentabe.png

 

This will conver your all measurs to % of your total sales and it will work on all filters as well.

 

 

final.png

you can see that y axis and tool tip has been changed to new values and each region is having % value as compared to total.

 

 

jahida
Impactful Individual
Impactful Individual

MEASURE = 100 * DIVIDE(SUM('Table'[Sales]), CALCULATE(SUM('Table'[Sales]), ALL('Table'[Product])))

 

Give that a try.

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.