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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gree1502
Helper II
Helper II

Compare 2 columns of 2 tables and filter one table

Hi,

 

I have 2 tables,

Table A with column "ID" and other columns

Table B with one column "ID"

 

the ID values in both the tables keep updating.

 

I want to filter table A (filter out ID values in Table A, which are in Table B "ID" column).

Is there a way to establish this relationship?

 

Any help appreciated.

Thanks

1 ACCEPTED SOLUTION

@gree1502

 

Create this Column:

 

Column = COUNTROWS(RELATEDTABLE('Table B'))




Lima - Peru

View solution in original post

6 REPLIES 6
Vvelarde
Community Champion
Community Champion

@gree1502

 

Do you want to filter in the Report or create a new table with Table A without the IDs equals in Table B.

 

Another Question.. The IDs in A & B are Duplicates or Uniques




Lima - Peru

Sorry for not being clear about the requirement.

 

I need to filter out in report.

The ID's in both the tables are unique.

 

Thanks

@gree1502

 

Hi, supossing that you have a relationship between both tables

 

Set in Report Filter like the image:

 

filter.png




Lima - Peru

thank you for the response.

I have tried this option, but I have many more constraints applied to Table A in the report which is creating a confusion.

Is there a way to create a column measure in Table A which will return 0 if the value is not present in Table B?

 

Thanks

@gree1502

 

Create this Column:

 

Column = COUNTROWS(RELATEDTABLE('Table B'))




Lima - Peru

It worked. Thank you:)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.