Power Query Custom Column

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Power Query Custom Column

Post by jstevens »

Is it possible to create a custom column having a data validation formula?

The formula would reference a different sheet having a list of items to choose from.
Regards,
John

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Power Query Custom Column

Post by Rudi »

Hi John,

Power query cannot pass a formula to a sheet. You could try to 'jippo' the process by doing the following...

Code: Select all

= Table.AddColumn(#"Removed Columns", "Custom", each "=" & Number.ToText([Quantity]) & "*100")
...but it will end up as a text type in the output column and simply display something like: "=50*100" in the cell. I guess in this instance you could use a macro to convert that string to a calculated output.

Bottom line: Power Query is not a tool to generate Excel based calculations. I'd question if there is not a more efficient and practical way of getting the solution you require.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Power Query Custom Column

Post by jstevens »

Rudi,

I developed other code to create the data validation.

Thanks for responding.
Regards,
John

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Power Query Custom Column

Post by Rudi »

:thumbup:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
hamster
StarLounger
Posts: 58
Joined: 10 Mar 2021, 22:57

Re: Power Query Custom Column

Post by hamster »

with Power Query you can try Expression.Evaluate(text)
ee.png
You do not have the required permissions to view the files attached to this post.