Forum Discussion
Whatever1
Helper I
5 years agoHow to use a parameter in an expression in M
I want to dynamically change a variable and use it to filter rows. let Variable = "ABC", Source = anything, #"Filtered Rows" = Table.SelectRows(source, each Text.Contains([FilterColum...
- 5 years ago
How are you applying it ?
I just tried it with a custom column and it worked.
let _variable = "A" in Table.SelectRows(#"Changed Type", each Text.Contains([Value], _variable))
camargos88
Community Champion
5 years ago
How are you applying it ?
I just tried it with a custom column and it worked.
let _variable = "A" in
Table.SelectRows(#"Changed Type", each Text.Contains([Value], _variable))Whatever1
Helper I
5 years agoI was trying to build part of the expression in the variable but, once I saw your post, it seemed obvious.
Thanks