Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have a list of employee IDs that are each assigned a Hire flag of 'yes' or 'no'. I am trying to create a new measure that says.
IF Hire field equals 'yes' THEN distinct count of Employee IDs
I would like this displayed as a whole number. Appreciate the help!
Solved! Go to Solution.
Hi @mlim0806
Presumably the Employee ID's are unique? And therefore a 'distinct' count is just a count as the ID's are already distinct?
Try this
Measure = CALCULATE(COUNTROWS('DataTable'), FILTER('DataTable', 'DataTable'[Hire] = "Yes"))
But if ID's are repeated, you can get your Distinct Count with this measure
Distinct ID Count = CALCULATE(DISTINCTCOUNT('DataTable_2'[ID]), FILTER('DataTable_2', 'DataTable_2'[Hire]="yes"))
regards
Phil
Proud to be a Super User!
Hi @mlim0806
Presumably the Employee ID's are unique? And therefore a 'distinct' count is just a count as the ID's are already distinct?
Try this
Measure = CALCULATE(COUNTROWS('DataTable'), FILTER('DataTable', 'DataTable'[Hire] = "Yes"))
But if ID's are repeated, you can get your Distinct Count with this measure
Distinct ID Count = CALCULATE(DISTINCTCOUNT('DataTable_2'[ID]), FILTER('DataTable_2', 'DataTable_2'[Hire]="yes"))
regards
Phil
Proud to be a Super User!
Thank you! It was an instance where Employee ID's could be hired on multiple accounts, so I wanted to count distinct. This worked!
Hi @mlim0806
Glad this worked. Please mark my answer as the solution so that anyone else reading this knows the solution.
Regards
Phil
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 68 | |
| 46 | |
| 44 | |
| 29 | |
| 20 |
| User | Count |
|---|---|
| 202 | |
| 130 | |
| 102 | |
| 71 | |
| 55 |