SOLVED

vlook up Power query

Copper Contributor

Hello, I wish to create a personalized column in Power query for a data base. This column would be conditional: if the condition is true, you put a text, if it's not, you put the price related to the reference, which is in another worksheet of the file.

Is it possible to create this column with the advanced editor in Power Query?

 

Thank you, Nathan.

5 Replies

@Nathan0763 , perhaps first you need to merge you main table with another query with prices and extract prices. After that add custom column with

if <condition> then [Text] else [Price]

However, that's not a good idea to mix texts and numbers in one column.

@Sergei Baklan  Thanks for your reply. I tried to merge the two worksheets but the merger is just creating a column of "Tables".

You were right about the format though, the condition returns either 0, or the price.

 

Nathan.

best response confirmed by Nathan0763 (Copper Contributor)
Solution

@Nathan0763 

Nathan, yes, that will be column with tables. Click on the icon with arrows on top right of that column header and extract Price and other fields which necessary. If you build relationship correctly it return Price or null if no related price. You may keep null as it is or replace it on zero.

@Sergei Baklan Okay, that's working perfectly, thank you very much !

Nathan.

@Nathan0763 , you are welcome

1 best response

Accepted Solutions
best response confirmed by Nathan0763 (Copper Contributor)
Solution

@Nathan0763 

Nathan, yes, that will be column with tables. Click on the icon with arrows on top right of that column header and extract Price and other fields which necessary. If you build relationship correctly it return Price or null if no related price. You may keep null as it is or replace it on zero.

View solution in original post