Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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.
Hi,
I would like to count the number of employee by department, and I use this formula
Following is the example of the table Terminate[ID]
Employee ID | Department | Status |
12345 | Finance | Voluntary |
12345 | Finance | Voluntary |
23456 | Account | Voluntary |
34567 | Human Resources | Voluntary |
45678 | Sales | InVoluntary |
Following is the example of the table Zero[Employee ID]
Employee ID | Department |
99999 | Marketing |
88888 | Marketing |
However, the result i got is
Which it should actually be 2 in finance and the total should be 4.
Please help me 🙏
Thank you
Solved! Go to Solution.
I see so you want to exclude Zero values.
With that in mind try this:
Test: (no except)
With:
Proud to be a Super User!
Hi,
This should do what you want:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Hi,
Thank you for your answer.
However, in my full data set, there are the employee ID in 'Terminate' table that can match with the 'Zero' table so I still need to contain (except(values(
I see so you want to exclude Zero values.
With that in mind try this:
Test: (no except)
With:
Proud to be a Super User!
It works!
Thank you so muchhh.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
15 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |