Forum Discussion
Help explaining % of row total formula
- 7 years ago
Two part of this, first part CALCULATE(SUM(Sheet1[ID])) calculates the sum based on fitler context and
2nd part CALCULATE(SUM(Sheet1[ID]),ALL(Sheet1[Status])) sum of all the values and ALL function remove any filters
which allos to get total
Assume you have two columns Category and Sales
A 100
A 100
B 200
B 200
C 400
Total sales is = 100 + 100 + 200 + 200 + 400 = 1000
Assume you have category on X axis and % formula on values to show the bar
So when it is showing % for category A , it is SUM of sales of category A which is 100 + 100 = 200 and 2nd part
is doing total sales which is 1000 and % would be 200 / 1000
and when it is category B, sum of category B is 200 + 200 = 400 and % will be 400 / 1000 , so on...
hope it helps.
Two part of this, first part CALCULATE(SUM(Sheet1[ID])) calculates the sum based on fitler context and
2nd part CALCULATE(SUM(Sheet1[ID]),ALL(Sheet1[Status])) sum of all the values and ALL function remove any filters
which allos to get total
Assume you have two columns Category and Sales
A 100
A 100
B 200
B 200
C 400
Total sales is = 100 + 100 + 200 + 200 + 400 = 1000
Assume you have category on X axis and % formula on values to show the bar
So when it is showing % for category A , it is SUM of sales of category A which is 100 + 100 = 200 and 2nd part
is doing total sales which is 1000 and % would be 200 / 1000
and when it is category B, sum of category B is 200 + 200 = 400 and % will be 400 / 1000 , so on...
hope it helps.