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! Learn more
Hi! Very new to PowerBi (VERYYYY) and need some assistance with calculating percentages.
I have a project that I am working on where I need to calculate the percentage of each group by the total number. As of right now, I am using the "Calculate % by grand total" filter, but am trying to figure out a DAX formula to force PowerBI to calculate by a different total rather than the grand total.
For example, I want Minority (270,375) to be divided by Total (763,943) so I get 35% and so on.
Right now, Minority (270,375) is being divided by the grand total (1,012,588) which I do not want.
Please help! I've YouTube and Googled and cannot find the answer to my problem.
As stated I am very new to this software so an explanation in layman terms is appreciated 🙂
@Anonymous , I think you need to Switch measure using Isinscope
How to Switch Subtotal and Grand Total in Power BI | Power BI Tutorials| isinscope: https://youtu.be/smhIPw3OkKA
Switch(true() ,
isinscope(Table[Race]), divide([Sum Measure], calculate(Table[Sum Measure], removefilters(Table[Race]) ) ),
divide([Sum Measure], calculate(Table[Sum Measure], allselected() ) )
)
Hi @Anonymous
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
| Race Firms Sort | Number of Firms | %GT CLEANED EMP FIRMS | EXPECTED % |
| MINORITY | 270,375 | 15.22% | 35.39% |
| -- Hispanic | 84,785 | 4.77% | 11.10% |
| -- Asian | 168,089 | 9.46% | 22.00% |
| -- Black or African American | 13,729 | 0.77% | 1.80% |
| -- American Indian and Alaska Native (AIAN) | 9,632 | 0.54% | 1.26% |
| NONMINORITY | 446,482 | 25.13% | 58.44% |
| EQUALLY MINORITY/NONMINORITY | 19,496 | 1.10% | 2.55% |
| TOTAL | 763,943 | 43.00% | n/a |
| GRAND TOTAL | 1,776,531 | 100.00% | n/a |
I am including another table because I didnt include the Total in the first one. TOTAL is the number I want the groups to divide from. The GRAND TOTAL is the number that PowerBI is dividing from. In the end, I will be removing the TOTAL filter from my data and the GRAND TOTAL from my data as well.
| Race Firms Sort | Number of Firms | %GT CLEANED EMP FIRMS | EXPECTED % |
| MINORITY | 270,375 | 15.22% | 35.39% |
| -- Hispanic | 84,785 | 4.77% | 11.10% |
| -- Asian | 168,089 | 9.46% | 22.00% |
| -- Black or African American | 13,729 | 0.77% | 1.80% |
| -- American Indian and Alaska Native (AIAN) | 9,632 | 0.54% | 1.26% |
| NONMINORITY | 446,482 | 25.13% | 58.44% |
| EQUALLY MINORITY/NONMINORITY | 19,496 | 1.10% | 2.55% |
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.