Dynamic filter power query excel

Good day
I am using power query in Excel for the first time
I am trying to change a static filter to a dynamic filter for both the column name to be filtered and the value.
So far I have managed to create a parameter table in excel and make the following changes to the syntax:
Source = Excel.Workbook(File.Contents("C:\Data YM\All members profile data YM.xlsx"), null, true),
Search_criteria_Parameter = Excel.CurrentWorkbook(){[Name="Parameter"]}[Content],
pColumn_name = Search_criteria_Parameter{0}[Name of parameter],
pColumn_value = Search_criteria_Parameter{0}[Value],
#"Data YM_Sheet" = Source{[Item="Data YM",Kind="Sheet"]}[Data],
#"Promoted Headers1" = Table.PromoteHeaders(#"Data YM_Sheet", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers1",{{"Web_Site_Member_ID", Int64.Type},
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each pColumn_name = pColumn_value)
#"Filtered Rows"
I get no errors but no resultant rows are displayed.
When I replace pColumn_name with [Web_Site_Member_ID] the query works.
When I step through the applied steps the value for pColumn_name displays correctly as Web_Site_Member_ID.
Can you please assist- first time using power query.
Alwyn SchutteAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Marcel BeugelsdijkCommented:
Try and replace:
each pColumn_Name = pColumn_value
each Record.Field(_,pColumn_name) = pColumn_value

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Alwyn SchutteAuthor Commented:
Dear Marcel
You are a star!
Works perfectly.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.