Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

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 @Anonymous 

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 @Anonymous 

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

Anonymous
Not applicable

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.