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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
bekirsalgin
Frequent Visitor

filter a table using another table

Hello,

 

I want to discard all Table1 rows that contains no "FamilyName, FirstName" matching with Table2. As long as at least one of the author names is available in Table2, the row should be kept. I guess the soultion should include "data structuring" and creating relationship between the tables but I couldn't find out how to do yet. 

Could you please advise?

 

Presentation1.jpg

 

 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @bekirsalgin ,

 

Add below measure to visual level filter and set its value to be greater than 0.

Measure1 =
VAR tempTable =
    ADDCOLUMNS (
        CROSSJOIN (
            SELECTCOLUMNS ( Table1, "Author", Table1[Author] ),
            SELECTCOLUMNS (
                Table2,
                "FamilyName,FirstName", Table2[FamilyName] & "," & Table2[FirstName]
            )
        ),
        "check", IFERROR ( FIND ( [FamilyName,FirstName], [Author] ), 0 )
    )
RETURN
    SUMX ( tempTable, [check] )

1.png

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @bekirsalgin ,

 

Add below measure to visual level filter and set its value to be greater than 0.

Measure1 =
VAR tempTable =
    ADDCOLUMNS (
        CROSSJOIN (
            SELECTCOLUMNS ( Table1, "Author", Table1[Author] ),
            SELECTCOLUMNS (
                Table2,
                "FamilyName,FirstName", Table2[FamilyName] & "," & Table2[FirstName]
            )
        ),
        "check", IFERROR ( FIND ( [FamilyName,FirstName], [Author] ), 0 )
    )
RETURN
    SUMX ( tempTable, [check] )

1.png

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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