Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
13 | |
11 | |
8 |