Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
julienvdc
Helper III
Helper III

Measure counting lines where only one specific criteria is met

Hey there,

 

I am struggling to find the right measure that would find out the amount of users who only belong to one specific group.

 

I have the following table, which says to which groups users belong to:

julienvdc_0-1650538350948.png

 

Users can belong to multiple groups. I want to calculate how many of these users ONLY belong to group with ID 3. As you can see in my screenshot above, the total would be 3 (user ID 1235, 1236, 1237 are the only ones who solely belongs to group ID 3).

 

Any ideas how I could achieve this? 🙂

 

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@julienvdc in case I understood what you want :)) try this:

Replace 'Table_Name' with the name of your table

 

COUNTROWS(
FILTER(
	VALUES('Table_Name'[c_members]),
	CALCULATE( NOT ISEMPTY('Table_Name'), 'Table_Name'[c_groups] = 3)
	&& CALCULATE( ISEMPTY('Table_Name'), 'Table_Name'[c_groups] <> 3)
)
)

 

View solution in original post

3 REPLIES 3
SpartaBI
Community Champion
Community Champion

@julienvdc in case I understood what you want :)) try this:

Replace 'Table_Name' with the name of your table

 

COUNTROWS(
FILTER(
	VALUES('Table_Name'[c_members]),
	CALCULATE( NOT ISEMPTY('Table_Name'), 'Table_Name'[c_groups] = 3)
	&& CALCULATE( ISEMPTY('Table_Name'), 'Table_Name'[c_groups] <> 3)
)
)

 

Hey @SpartaBI !

 

**bleep**! I spent the whole morning trying to figure this out and you solve it in a few sec.! 

 

Amazing, this does the trick.

 

Thanks you so much!

J.

@julienvdc Haha my pleasure 🙂
Listem, check out my showcase report, maybe you'll find there cool stuff you will appreciate 🙂
https://community.powerbi.com/t5/Data-Stories-Gallery/Contoso-by-SpartaBI/td-p/2449543

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors