cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rfrikha1992
Helper I
Helper I

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 :

Rfrikha1992_2-1623767835692.png

Table 2 :

Rfrikha1992_3-1623767915689.png

 

 

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 🙂 

1 ACCEPTED SOLUTION
aj1973
Community Champion
Community Champion

Hi @Rfrikha1992 

Here you go

aj1973_0-1623770912292.png

 

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

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

3 REPLIES 3
aj1973
Community Champion
Community Champion

Hi @Rfrikha1992 

Here you go

aj1973_0-1623770912292.png

 

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

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

Thanks , it works 😄 😄 

aj1973
Community Champion
Community Champion

Welcome

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.