Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have dummy data for employee and their sales values.
I am trying to get a dax code for the following:
- Count of Emp Sales: count number of employees (by unique id) who made a sale (regardless of the values including 0) ( only to exclude blanks).
- Count sales: count of sales per manager
- Count of no sales: count of no sales per manager
Expected outcome based on the sample data:
| Manager | Total Employee | Count of Emp Sales | Count of Sales | Count of no Sales |
| Basilius Josip | 4 | 4 | 6 | 2 |
| Drika Eurig | 5 | 4 | 6 | 2 |
| Eadburga Yasmeen | 4 | 3 | 6 | 2 |
| Gergana Nellie | 2 | 2 | 5 | 3 |
| Halvor Suerius | 2 | 2 | 8 | 0 |
| Jamal Mohan | 3 | 3 | 10 | 2 |
| Kağan Dreda | 6 | 6 | 18 | 6 |
| Mari Felizitas | 1 | 2 | 7 | 1 |
| Shahin Zlata | 2 | 2 | 7 | 1 |
| Vendelín Rati | 2 | 2 | 7 | 1 |
| Total | 31 | 30 | 80 | 20 |
Many thanks.
Solved! Go to Solution.
Hi @H_insight
Try this:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi Heshamk:
That was interesting! If you have a data model vs. flattened file it will be better for any kind of analysis.
Please see link for results:
https://drive.google.com/file/d/1SNTX1VLuiWsDODT_rYGXKNl5OPBbeFAO/view?usp=sharing
Thanks for the quick response. I appreciate I have a flat file, but it's only due to having a sample file 🙂
I think most of my requirements has been delivered, except "Count of Emp Sales", where out of the 31 unique employees, only 1 didnt make any sales. The outcome should be 30.
I.e. Manager Drika Eurig, have 5 employees. 4 made sales excet 1.
Hope that helps.
Hi @H_insight
Try this:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 13 | |
| 10 | |
| 8 |