Forum Discussion

driplytics's avatar
driplytics
Frequent Visitor
4 years ago
Solved

Create a custom column with value from another table

Hi, i need help with this. i have a flight data table with column name AirportFrom  and another AirportTo, columns has IATA code(Airport Code).                                 ...
  • v-easonf-msft's avatar
    v-easonf-msft
    4 years ago

    Hi, driplytics 

    Delete the relationship/add a new seperate table and then try calculated columns as below:

    AirportOrigin = LOOKUPVALUE('Airport Data'[name],'Airport Data'[iata_code],'Dataset'[AirportFrom])
    Airport Destination = LOOKUPVALUE('Airport Data'[name],'Airport Data'[iata_code],'Dataset'[AirportTo])

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