DAX to count Gender for repeating row for each staff

Hi Experts,

Kindly assist that how can i count the Gender - Male/Female from my dataset where values are repeating. I have attached the sample excel file.
I have tried using distinct count but it gives only male -1 and female 1 only. which is incorrect.
How can i achieve this.

Thank you
GenderCount.xlsx (8.4 KB)

1 Like

Hi Keith,

Count rows will count all the rows, but i have repeating rows for same employee.
so one employee should count as 1 with its gender.

@Keith

image

LOL…sorry, thought this was an Excel issue :joy: :joy:

Here is the DAX

Male Count =
CALCULATE ( DISTINCTCOUNT ( 'Table'[Employee ID] ), 'Table'[Gender] = "Male" )
Female Count =
CALCULATE ( DISTINCTCOUNT ( 'Table'[Employee ID] ), 'Table'[Gender] = "Female" )

image

1 Like

:scream: :scream: :scream: :scream: :scream:

1 Like

Thank you @DavieJoe
Appreciate your help

1 Like

Anytime @EnanBahadur