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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,223,880
Messages
6,175,157
Members
452,615
Latest member
bogeys2birdies

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