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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
srivallyk
New Member

Get column from another table

Hi Experts,

I have a scenario like need to retrieve a column from one table to other table which we do not have any relation among each tables.
Can anyone help me on this.

Regards,
Srivally

1 ACCEPTED SOLUTION

Hi @srivallyk 
Sorry, seems somehow I missed your reply. Apologies for the late response. Please use

Program Name = 
VAR T1 = ADDCOLUMNS ( 'Project Programme', "@ProgramName", RELATED ( Programme[ProgrammeName] ) )
VAR T2 = FILTER ( T1, 'Project Programme'[ProgrammeKey] = Project[ProjectKey] )
RETURN
    MAXX ( T2, [@ProgramName] )

View solution in original post

7 REPLIES 7
srivallyk
New Member

Hi @tamerj1 , I have attached the data model.
Here I want ProgrammeName from Programme Table  to Project Table.
https://www.dropbox.com/s/tm3orr9kpqvlatt/Test.pbix?dl=0

 

Hi @srivallyk 
Sorry, seems somehow I missed your reply. Apologies for the late response. Please use

Program Name = 
VAR T1 = ADDCOLUMNS ( 'Project Programme', "@ProgramName", RELATED ( Programme[ProgrammeName] ) )
VAR T2 = FILTER ( T1, 'Project Programme'[ProgrammeKey] = Project[ProjectKey] )
RETURN
    MAXX ( T2, [@ProgramName] )

But if I have multiple Programme Names for one Project, I'm getting only one Programme Name. I need to show either all Programme Names under that Project or simply show '-' for the Project.

Hi @srivallyk 
Please update the sample file to reflect the same and share it with me.

Hi @tamerj1 
attached is the link for the file.
https://www.dropbox.com/s/3jrlh7un2ev3hgd/Test_Card.pbix?dl=0
Here in the attached data model, relationships are not created because it cannot be created originally there are other datasets which I have not included. 
If I select Project from the slicer, respective Programe and Legal Name should dispaly under respective cards. If I have multiple program/Legal Name under one Project selection, it should display '-' in card.

@srivallyk 
I can see that you've already done that successfully. Am I missing something?

tamerj1
Super User
Super User

Hi @srivallyk 
Please provide more information.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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