Forum Discussion

CarlsBerg999's avatar
CarlsBerg999
Helper V
4 years ago
Solved

Lookup from the same table

Hi,    My data looks like the picture below. What i need to do is a calculated column (green), where each Child gets the name of the Parent. - Each Child has a Parent  - The Parent column works a...
  • v-yalanwu-msft's avatar
    4 years ago

    Hi, CarlsBerg999 ;

    You could use column or measure by dax:

     

    COLUMN = 
     CALCULATE(MAX('Table'[Name]),
    FILTER('Table','Table'[ID]=EARLIER('Table'[Parent])))
    Measure = 
     CALCULATE(MAX('Table'[Name]),
    FILTER(ALL('Table'),'Table'[ID]=MAX('Table'[Parent])))

     

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.