Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Relationship between tables

Hi, 

 

I'm having some trouble creating a relationship between 3 tables, which are all related by the column 'metric'. I'd love to link them all so i can then filter/slice by the 'Metric' - Each table has the metrics - PTAT, PEOPLE REACHED & PAGE LIKES 

 

Anyone able to help?

 

Thank you!

Sonia

 

 

 

  • Phil_Seamark's avatar
    Phil_Seamark
    8 years ago

    This DAX might help create a table that you can then relate your three existing tables to

     

    Table = 
        DISTINCT(
            UNION(
                VALUES('Demo'[METRIC]) ,
                VALUES('Country'[METRIC]) ,
                VALUES('City'[METRIC]) 
                )
          )

6 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    HI Anonymous

     

    Does one of the three tables only have unique values for METRIC in it?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Richard, 

       

      No, they've all got the same three (but different values for each metric) which i think could be the problem! 

       

      Is there any way around this?

      • Phil_Seamark's avatar
        Phil_Seamark
        Microsoft Employee

        Maybe create a new table that has every METRIC value