using parameter to reference column in custom column

DaveBlakeMAAT

Board Regular
Joined
Feb 28, 2016
Messages
190
Hi

I have a parameters PQ function which is used to dynamically renames column, which is working great, however I am having trouble using the parameter in a custom column formula to reference the column name, my objective is to create the custom column so i can use to filter unwanted records.

I've tried the following:
Power Query:
if(
            "[" & RPText12 & "]" = 0 and "[" & RPText11 & "]" = 0 )
        then
            "Remove"
        else
            "Keep"

if(
            RPText12 = 0 and RPText11 = 0)
        then
            "Remove"
        else
            "Keep"

what i am trying to achieve is a parametrized version of the following:

Power Query:
if(
            [Sep 20] = 0 and [Oct 20] = 0 )
        then
            "Remove"
        else
            "Keep"

Thanks in advance for any assistance.

Regards

Dave
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,224,813
Messages
6,181,117
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top