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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
crodrigueza
Regular Visitor

filter a table excluding selected elements

Hi, 

 

I would like to make a count on a table, but excluding first some elements in another table. The next example may clarify the situation:

 

Table A:

 

UserProduct
AProduct A
BProduct B
CProduct B
DProduct B
EProduct A
FProduct C

 

Table B:

 

UserEmail
AA@outlook.com
BB@outlook.com
CC@outlook.com
DD@outlook.com
EE@outlook.com
FF@outlook.com
GG@outlook.com
HH@outlook.com
II@outlook.com

 

Table A and Table B will have a relationship of 1:1 by user. Filtering table A by "Product A", I would like to count the users in table B different from those filtered in Table A:

 

Table B filtered:

 

UserEmail
BB@outlook.com
CC@outlook.com
DD@outlook.com
FF@outlook.com
GG@outlook.com
HH@outlook.com
II@outlook.com

 

And the count result should be 7. Any ideas on how to achieve it?

 

Best regards, 

 

Carlos

 

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @crodrigueza 

 

Since you have created a one-to-one relationship in two tables.

You can directly create the measure like this:

Measure = var a= COUNTROWS(TableB)
var b=COUNTROWS(ALL(TableB))
return b-a

vjaneygmsft_0-1650511854901.png

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

View solution in original post

1 REPLY 1
v-janeyg-msft
Community Support
Community Support

Hi, @crodrigueza 

 

Since you have created a one-to-one relationship in two tables.

You can directly create the measure like this:

Measure = var a= COUNTROWS(TableB)
var b=COUNTROWS(ALL(TableB))
return b-a

vjaneygmsft_0-1650511854901.png

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.

Users online (14,734)