Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
Product | Sales | Expected output |
A | 130 | 6.388206388 |
B | 332 | 16.31449631 |
C | 321 | 15.77395577 |
D | 342 | 16.80589681 |
E | 910 | 44.71744472 |
Thanks,
Thimma
Solved! Go to Solution.
MEASURE = 100 * DIVIDE(SUM('Table'[Sales]), CALCULATE(SUM('Table'[Sales]), ALL('Table'[Product])))
Give that a try.
@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
Measure:
Pct Of Total = DIVIDE(SUM(Table10[Sales]),CALCULATE(SUM(Table10[Sales]),ALL(Table10[Product])))*100
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.
Now right click on Sales measure in visual propertise, following menue will be visible and you have option for "Quick Calc"
While clicking on Quck Calc you can see below option for calcuations and you can select % of Grand Total.
This will conver your all measurs to % of your total sales and it will work on all filters as well.
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.
issue sloved. .... cont.%
@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
Measure:
Pct Of Total = DIVIDE(SUM(Table10[Sales]),CALCULATE(SUM(Table10[Sales]),ALL(Table10[Product])))*100
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.
Now right click on Sales measure in visual propertise, following menue will be visible and you have option for "Quick Calc"
While clicking on Quck Calc you can see below option for calcuations and you can select % of Grand Total.
This will conver your all measurs to % of your total sales and it will work on all filters as well.
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.
MEASURE = 100 * DIVIDE(SUM('Table'[Sales]), CALCULATE(SUM('Table'[Sales]), ALL('Table'[Product])))
Give that a try.
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 |
---|---|
109 | |
101 | |
84 | |
79 | |
69 |
User | Count |
---|---|
120 | |
110 | |
95 | |
82 | |
77 |