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.
Dear everyone,
I have dataset with the below structure:
Factory | Person | Type |
Factory 3 | person 100 | Type 1 |
Factory 3 | person 100 | Type 16 |
Factory 3 | person 100 | Type 6 |
Factory 3 | person 101 | Type 1 |
Factory 3 | person 101 | Type 21 |
Factory 3 | person 101 | Type 22 |
Factory 3 | person 101 | Type 23 |
Factory 3 | person 101 | Type 6 |
Factory 3 | person 102 | Type 1 |
Factory 3 | person 102 | Type 16 |
Factory 3 | person 102 | Type 23 |
Factory 3 | person 102 | Type 6 |
Factory 3 | person 103 | Type 1 |
I use Factory and Type as filters. And I want to count number of unique persons with the selected types.
For example, if I select Type as "Type 1", "Type 22", "Type 23" then there is a measure that shows the number of persons which 3 above types only.
Here is the file
http://www.mediafire.com/file/kf9pg8d9wz7kjnw/Count_the_filtered_only.pbix/file
Can you please help me out?
Thank you in advance!
Best regards,
Cindy
Hi, @Anonymous
If you take the answer of someone, please mark it as the solution to help the other members who have same problems find it more quickly. If not, let me know and I'll try to help you further. Thanks.
Best Regards
Allan
Hi, @Anonymous
Based on your description, you may create a measure as below.
Result =
var _num =
CALCULATE(
DISTINCTCOUNT(Sheet4[Type]),
ALLSELECTED(Sheet4)
)
var tab =
SUMMARIZE(
Sheet4,
Sheet4[Person],
"flag",
IF(
DISTINCTCOUNT(Sheet4[Type])=_num,
1,0
)
)
return
CALCULATE(
DISTINCTCOUNT(Sheet4[Person]),
FILTER(
tab,
[flag]=1
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , do you having all three types. Because having one of the three is the default behavior
Try like
measure =
var _cnt = countx(allselected(Table), Table[Type])
return
countx(filter(summarize(table, table[person], "_1", countrows(Table)),[_1]=_cnt),[person)
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 |
---|---|
81 | |
42 | |
30 | |
27 | |
27 |