vlook up Power query

New 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, 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 !


@Nathan0763 , you are welcome

Related Conversations
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Edge insider Dev bypasses IE mode website list
HotCakeX in Enterprise on
4 Replies