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
Hi
I'm trying to get the distinct count of every project assigned to each unit. For the days that there's only one unit I'm getting the calculation right but not for those days with 2 or more units.
With this formula I'm getting the following result:
Solved! Go to Solution.
Hi @Anonymous ,
Thanks to @shravanreddy133 for the great ideas.
This dax can be modified as
Count Project =
SUMX(
VALUES('HS per Project'[Ship Date]),
CALCULATE(
DISTINCTCOUNT('HS per Project'[Project]),
ALLEXCEPT('HS per Project', 'HS per Project'[Ship Date], 'HS per Project'[Unit])
)
)
Fianl output
Hi @Anonymous ,
Thanks to @shravanreddy133 for the great ideas.
This dax can be modified as
Count Project =
SUMX(
VALUES('HS per Project'[Ship Date]),
CALCULATE(
DISTINCTCOUNT('HS per Project'[Project]),
ALLEXCEPT('HS per Project', 'HS per Project'[Ship Date], 'HS per Project'[Unit])
)
)
Fianl output
Thanks for the help @Anonymous. This one solved my problem!
Try Using ALLEXCEPT instead of ALL SELECTED:
SUMX(
VALUES('HS per Project'[Ship Date (bins)]),
CALCULATE(
DISTINCTCOUNT('HS per Project'[Project]),
ALLEXCEPT('HS per Project', 'HS per Project'[Unit])
)
)
Hi @shravanreddy133 it did fix the units that does not repeat over the days but everything else is wrong. Seems that now it's counting the projects of the same unit without considering they are from different dates.
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 |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 19 | |
| 13 | |
| 10 |