Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Percentage Measure

Hi,

 

I am trying to create a percentage of BAME employee's within my 'HC' table. I have ethnicity group within the HC table also, but need to select "Asian", "Black", "Mixed". 

How do i filter the count for the Ethnicty group without filtering the Count of employee ID too?

 

Thanks in advance.

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    I may have gone about this a long way but its now working.

    I have a count of BAME with a filter for the ethnicity groups i need. 

    Then i have created another measure dividing the HC by my BAME count.

     

     

    This has now given me the right percentage.

4 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    Try it.

    Bame% =
    DIVIDE (
        DISTINCTCOUNT ( 'HC'[EMPLOYEE ID] ),
        CALCULATE ( COUNT ( 'HC'[Ethnicity Group] ), ALLSELECTED ( 'HC' ) )
    )
    

    Or can you share a simple example and the result you want to output?which could understand your logic more clearly.


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Unfortunately that wont work, as i am not looking for the amount of ethcnity groups, but the amount of employee ID's against certain ethnicty groups. Apologies if i wasnt clear.


    I basically need to get a percentage of 100 (amount in a bame group) /2000 (Number of distinct employee ID's).

  • Anonymous's avatar
    Anonymous
    Not applicable

    I may have gone about this a long way but its now working.

    I have a count of BAME with a filter for the ethnicity groups i need. 

    Then i have created another measure dividing the HC by my BAME count.

     

     

    This has now given me the right percentage.