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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 @Moyfeartu23 ,
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 @Moyfeartu23 ,
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 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 |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
24 | |
10 | |
10 | |
9 | |
6 |