Forum Discussion

michellepace's avatar
michellepace
Icon for Resolver III rankResolver III
7 years ago
Solved

Create a column based on a lookup in another table

Hi, I've spent the last hour trying to understand this and google around. I must be missing something completely because it simply cannot be that difficult. Alright, I have the below two tables:

 

___________________

Table 1: 

AccNumber |

 

Table 2:

AccNumber | AccDescrip

___________________

 

All I want to do is create an additional calculated column called "Main" in Table 1. Where for each row, the equivalent vlookup function would be: 

 

Main = vlookup( Table1.AccNumber * 1000,  Table2,  2,  False)

 

Could anyone please shed some light as to what my formula would be for creating a calculated column?

 

  • dax's avatar
    dax
    7 years ago

    Hi michellepace,

    You could try below

    Column = LOOKUPVALUE('Table2'[AccNumber],'Table2'[AccNumber],'Table 1'[AccNumber])*1000

    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi, it's amazing how I can make something so simple so complicated :). The RELATED function worked for me. Just posting this pic here for anyone else who may find it useful.