Forum Discussion

srivallyk's avatar
srivallyk
New Member
3 years ago
Solved

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

  • tamerj1's avatar
    tamerj1
    3 years ago

    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] )

7 Replies

    • tamerj1's avatar
      tamerj1
      Community Champion

      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] )
      • srivallyk's avatar
        srivallyk
        New Member

        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.