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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ch_01
New Member

Percentage formula

Hi, 

 

I need to calculate percentage promoted people according to Gender from total employees, 
( Columns: Total Employees, Gender, Hire (1/0 as values), Hire percentage) when I try to calculate percentage for Hire its giving me 100% as results for both genders. 

 

 I'm pretty new to Power BI so looking for some help.

Screenshot (163).png

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @ch_01 

 

You can try the following methods.
Measure:

Percentage = 
Var _N1=CALCULATE(COUNT('Table'[Gender]),FILTER(ALL('Table'),
                        [Gender]=SELECTEDVALUE('Table'[Gender])&&[Promotion 2021]=1))
Var _N2=CALCULATE(COUNT('Table'[Gender]),ALL('Table'))
Return
DIVIDE(_N1,_N2)

vzhangti_1-1672726131247.png

Please check the attachment, I hope it can help you.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @ch_01 

 

You can try the following methods.
Measure:

Percentage = 
Var _N1=CALCULATE(COUNT('Table'[Gender]),FILTER(ALL('Table'),
                        [Gender]=SELECTEDVALUE('Table'[Gender])&&[Promotion 2021]=1))
Var _N2=CALCULATE(COUNT('Table'[Gender]),ALL('Table'))
Return
DIVIDE(_N1,_N2)

vzhangti_1-1672726131247.png

Please check the attachment, I hope it can help you.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

lin_k
New Member

Hi ch_01,

 

my advice is that you continue and load your Data. Then do the calculations afterwards. A good way would be to use the DAX-Quickmeasures (https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-quick-measures), here you can do division, percentage calculation etc. more easy than writing a M-Query. I hope this helps. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.