cancel
Showing results for 
Search instead for 
Did you mean: 
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
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

Microsoft
Microsoft

@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

Responsive Resident
Responsive Resident

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

3 REPLIES 3
Microsoft
Microsoft

@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

Responsive Resident
Responsive Resident

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

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

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors