Forum Discussion

ch_01's avatar
ch_01
New Member
3 years ago
Solved

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 ...
  • v-zhangti's avatar
    3 years ago

    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)

    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.