Hello, hope that you solved this but in case you couldnt know that this can be solved with the function Expression.Evaluate.
In my example case (see picture) I had a table which for every line it had a different table embedded in column [Custom], and what I needed to do is to filter that embedded table leaving out any row with null value in the column whose name is given in column [Columna].
That means that the problem is the same as yours, I needed to take a string from column [Columna] and convert it in a column identifier.
I could solve it with this piece of code:
= Table.AddColumn(
#"Added Custom",
"Table_filtered",
each
let
tabla_de_la_linea = [Custom],
columna_para_filtrar = [Columna]
in
Expression.Evaluate(
"Table.SelectRows(tabla_a_evaluar,each " & columna_para_filtrar & " <> null)",
[
Table.SelectRows = Table.SelectRows,
tabla_a_evaluar = tabla_de_la_linea,
columna_para_filtrar = columna_para_filtrar
]
)
)