Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello! I am working on an employee headcount report, where my data builds each day with a new report run date. I am trying to capture the number of active Males and the number of active Females as of today. The measure I'm using to count the active employees is:
Solved! Go to Solution.
@tamerj1 , actually disregard that! I missed entering the actual employee IDs into "emp 1" and "emp 2".
Thank you so much!
@tamerj1 , actually disregard that! I missed entering the actual employee IDs into "emp 1" and "emp 2".
Thank you so much!
Hi @jlaroo33
If these are the only 2 employees tha had the Gender "Not Specified" and there are no other record that has the Gender "Not Specified" then you may try
Active Employees NEW =
CALCULATE (
COUNTROWS ( 'HeadCount_Term_Report NEW' ),
LASTDATE ( 'HeadCount_Term_Report NEW'[Report Run Date] ),
'HeadCount_Term_Report NEW'[Gender] <> "Not Specified"
)
In case you have records that have the gender "Not Specified" other than these 2 employees and you want them to be included with the count then you may try
Active Employees NEW =
VAR ExcludedRecords =
CALCULATETABLE (
'HeadCount_Term_Report NEW',
'HeadCount_Term_Report NEW'[empID] IN { "emp1", "emp2" },
'HeadCount_Term_Report NEW'[Gender] = "Not Specified"
)
VAR LastDateTable =
CALCULATETABLE (
'HeadCount_Term_Report NEW',
LASTDATE ( 'HeadCount_Term_Report NEW'[Report Run Date] )
)
RETURN
COUNTROWS ( EXCEPT ( LastDateTable, ExcludedRecords ) )
Hi @tamerj1 ,
Thank you for looking into my issue. Unfortunately, the second formula that you provided (which is what I want, to include other "Not Specified" employees) did not see to work. Those two records are still being counted.
Thank you, Jodi
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
10 |
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
8 |