Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi,
Im struggling a little bit with an measure.
I have the following table.
ID Status Type Name
123 | accept | yes | yellow |
123 | accept | yes | |
456 | not possible | standard | green |
456 | not possible | standard | |
789 | not possible | standard | green |
135 | accept | no |
I want to distinctcount the ID column, and then calculate Type column = "Yes" and "No" AND the Status column = "not possible" and the Name column = "Green".
So the outcome must be: 4
ID Status Type Name
123 | accept | yes | yellow |
456 | not possible | standard | green |
789 | not possible | standard | green |
135 | accept | no |
My formula is:
Solved! Go to Solution.
This formula must be it.
Count =
CALCULATE(
DISTINCTCOUNT(tableA[ID]),
(tableA[Type] = "yes" || tableA[Type] = "no") ||
(tableA[Status] = "not possible" &&
tableA[Name] = "green"))
The only question I have now is, ID 456 is double and with distinctcount I get 1 count. But will it count the row with column "name" and "green" value or the other one. So is distinccount after the filters has been set or is it before the filters.
Hi @Tinus1905
try below measure.
I hope I answered your question!
Hi @Tinus1905
try below measure.
I hope I answered your question!
This formula must be it.
Count =
CALCULATE(
DISTINCTCOUNT(tableA[ID]),
(tableA[Type] = "yes" || tableA[Type] = "no") ||
(tableA[Status] = "not possible" &&
tableA[Name] = "green"))
The only question I have now is, ID 456 is double and with distinctcount I get 1 count. But will it count the row with column "name" and "green" value or the other one. So is distinccount after the filters has been set or is it before the filters.
just realized that there isnt actually any ID matching with all conditions you looked for.
I highlighted values matching the condition with green. See below there is no single line meets your all
Type column = "Yes" and "No" AND the Status column = "not possible" and the Name column = "Green". .
ID Status Type Name
123 | accept | yes | yellow |
123 | accept | yes | |
456 | not possible | standard | green |
456 | not possible | standard | |
789 | not possible | standard | green |
135 | accept | no |
Hi @Tinus1905
try below measure
I hope I naswered your question!
Give it a shot with this;
Count =
CALCULATE(
DISTINCTCOUNT(tableA[ID]),
FILTER(
tableA,
(tableA[Type] = "yes" || tableA[Type] = "no") &&
tableA[Status] = "not possible" &&
tableA[Name] = "green"
)
)
Sadly the outcome is still 0.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
42 | |
31 | |
27 | |
27 |