Forum Discussion

Marcin's avatar
Marcin
Helper V
7 years ago
Solved

Filter table by table

Hi,

 

I am looking for soultion for this case.

 

Assume I have two tables like this :

Table1   Table2 
      
IdName  IdValue
1Adam  540
2John  645
3Peter  355
4Megan  442

 

 

What I would like to get is table table one to be filtered out with ID values from table2 . ( In sql I would use "ID is not in" )

 

So my result will be : 

 

IdName
1Adam
2John

 

So values with IDs 3 and 4 are filtered out becasue they exist in column Id of table2 

  • Hi Marcin 

    You can create a new calculated table:

    NewTable =
    FILTER ( Table1, NOT Table1[Id] IN DISTINCT ( Table2[Id] ) )

1 Reply

  • AlB's avatar
    AlB
    Community Champion

    Hi Marcin 

    You can create a new calculated table:

    NewTable =
    FILTER ( Table1, NOT Table1[Id] IN DISTINCT ( Table2[Id] ) )