Forum Discussion

adieball's avatar
adieball
Helper I
7 years ago
Solved

Replace Text.Rage result with a value from another table

Hi

I filter a string out of a text with:

= try if Text.StartsWith([Product_Number], "P-") then Text.Range([Product_Number],11,2) else "NoService" otherwise "NoService"

 

that works fine solar and the result is e.g. A1, A2, A3, etc. I have another table that looks like:

 

A1 || Vendor1

A2 || Vendor2

etc.

 

How can I enhance above furmula to  do the lookup immediately, i.e. putting "Vendor1" or "Vendor" in the column instead of the Text.Range result?

 

thanks

  • HI,@adieball

        After my research, you can do these follow my steps:

    Step1:

    Use your formula to add a custom column

    Step2:

    Step3:

    Expand the table

    Step4:

    add a conditional colum:

     

    Result:

     

    You can also remove unnecessary column

     

    Best Regards,

    Lin

1 Reply

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    HI,@adieball

        After my research, you can do these follow my steps:

    Step1:

    Use your formula to add a custom column

    Step2:

    Step3:

    Expand the table

    Step4:

    add a conditional colum:

     

    Result:

     

    You can also remove unnecessary column

     

    Best Regards,

    Lin