Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Power BI Relationship between two tables

I have 2 tables T1 and T2 and they related to each other using T1(1-*)T2. 

Now I wanted to show the rows from T1 where I couldn't find atleast one row in T2. 

Using SQL I could write something like this ... 

 

Select * from T1

Left Join T2 on T1.c1= T2.c1

where T2.c1 is NULL

 

But how could I acheive this in Power BI. 

Any Idea would be appreciated. Thanks in advance.

4 Replies

  • v-cherch-msft's avatar
    v-cherch-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous

     

    One way is to new a table with EXCEPT Function . The other way is to use Merge Queries in Query Editor. For example:

    Regards,

    Cherie

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Is there any way that we can do by just making use of relationships ?

      • v-cherch-msft's avatar
        v-cherch-msft
        Icon for Microsoft Employee rankMicrosoft Employee

        Hi Anonymous

         

        You may try to set the 'Cross filter direction' to 'Both' in relationship.

         

        Regards,

        Cherie