Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

PowerBI Table: How to calculate percentage

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 🙂

 

Capture.PNG

5 REPLIES 5
amitchandak
Super User
Super User

@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() ) )

)

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Ritaf1983
Super User
Super User

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Anonymous
Not applicable

Race Firms SortNumber of Firms%GT CLEANED EMP FIRMSEXPECTED %
MINORITY270,37515.22%35.39%
 -- Hispanic84,7854.77%11.10%
 -- Asian168,0899.46%22.00%
 -- Black or African American13,7290.77%1.80%
 -- American Indian and Alaska Native (AIAN)9,6320.54%1.26%
NONMINORITY446,48225.13%58.44%
EQUALLY MINORITY/NONMINORITY19,4961.10%2.55%
TOTAL763,94343.00%n/a
GRAND TOTAL1,776,531100.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. 

Anonymous
Not applicable

Good morning @Ritaf1983 hopefully this helps. Thanks in advance!

Anonymous
Not applicable

Race Firms SortNumber of Firms%GT CLEANED EMP FIRMSEXPECTED %
MINORITY270,37515.22%35.39%
 -- Hispanic84,7854.77%11.10%
 -- Asian168,0899.46%22.00%
 -- Black or African American13,7290.77%1.80%
 -- American Indian and Alaska Native (AIAN)9,6320.54%1.26%
NONMINORITY446,48225.13%58.44%
EQUALLY MINORITY/NONMINORITY19,4961.10%2.55%

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors