Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Add column from many to 1 table

Greeting all , 

 

im trying to add a column from a table to another one ( the relation between them is many to 1 ) 

here is a sample : 

Table 1 :

Table 2 :

 

 

im trying to add the Category column to the table 2 , but i cant do it using the related Function , any help or tricks plaese .

 

Thanks all in advance 🙂 

  • Hi Anonymous 

    Here you go

     

    Category_ = CALCULATE(SELECTEDVALUE('Table 1'[Category]), USERELATIONSHIP('Table 1'[Class Num],'Table 2'[Class Num]))
     

3 Replies

  • aj1973's avatar
    aj1973
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

    Here you go

     

    Category_ = CALCULATE(SELECTEDVALUE('Table 1'[Category]), USERELATIONSHIP('Table 1'[Class Num],'Table 2'[Class Num]))
     
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks , it works 😄 😄