Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
I'm a new user to PBI and a colleague of mine was asking for some help on calculating the % of Row Total in a bar chart, which wasn't being presented to him as an option in the list of "show value as". We came across this formula online:
Measure = CALCULATE(SUM(Sheet1[ID]))/CALCULATE(SUM(Sheet1[ID]),ALL(Sheet1[Status]))
This makes it work beautifully, but for the life of my I can't work out why. Would someone be so kind as to explain it in laymens terms? Why would I divide the total by the total? Thankyou!
Matt
Solved! Go to Solution.
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.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.