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 All,
I have a column in my report that shows how many inspections are completed this year, by location.
I have a measure that counts the number of inspections completion for this year:
I have the totals value on, and it counts 6 rows, but there are 7 in the table as in the below screenshot
Does anyone know why it would count only 6? There are clearly 7 in the table 🙂
TIA,
Joe
Solved! Go to Solution.
Hello @joef
looks like `DISTINCTCOUNT()` with `ALLEXCEPT()`, is behaving differently in totals.
try this
Completed_Inspections_This_Year =
VAR CurrentYear = YEAR(TODAY())
RETURN
SUMX(
VALUES('Asset_Inspections'[Loc]),
VAR LocationCount = CALCULATE(
DISTINCTCOUNT('Asset_Inspections'[Last inspection Date]),
YEAR('Asset_Inspections'[Last inspection Date]) = CurrentYear
)
RETURN
LocationCount
)
Hi @nilendraFabric ,
Thank you, removing the ALLEXCEPT and returning the loc did the trick!
Thanks again,
Joe
Hi @joef,
Thanks for reaching out to the Microsoft fabric community forum.
I would also take a moment to personally thanks @nilendraFabric, for actively participating in the community forum and his inputs.
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it. Therefore, please refer to the attached pbix file.
I hope this should resolve your issue, if you need any further assistance, feel free to reach out.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Best Regards.
Hello @joef
looks like `DISTINCTCOUNT()` with `ALLEXCEPT()`, is behaving differently in totals.
try this
Completed_Inspections_This_Year =
VAR CurrentYear = YEAR(TODAY())
RETURN
SUMX(
VALUES('Asset_Inspections'[Loc]),
VAR LocationCount = CALCULATE(
DISTINCTCOUNT('Asset_Inspections'[Last inspection Date]),
YEAR('Asset_Inspections'[Last inspection Date]) = CurrentYear
)
RETURN
LocationCount
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 62 | |
| 18 | |
| 12 | |
| 11 | |
| 10 |