Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Help with M code + Vlookup

Hello!   I am creating a complex database that will have import info from Share point list and connect to Data Lake databases.   I have no experience/knowledge with  M code but I would like to us...
  • v-janeyg-msft's avatar
    v-janeyg-msft
    5 years ago

    Hi, Anonymous 

     

    Sorry for the late reply because of the weekend. You can try the custom column in PQ. Sample file is below.

    Like this:

    let 
    t1=Table.SelectRows(#"TableB",(x)=>x[DICE_MECO ECO]=[ECO]),
    t2= Table.SelectRows(#"TableB",(x)=>x[DICE_MECO ECO]=[DICE MECO]) 
    in 
    if Table.RowCount(t1)>0
    then List.Sum(t1[FA Proj. ID])
    else if Table.RowCount(t2)>0
    then List.Sum(t2[FA Proj. ID])
    else null

     

    Best Regards

    Janey Guo

     

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