Forum Discussion
avbraga
2 years agoNew Member
table names as a quoted string parameter in advanced editor
Hi all, using the Advanced Editor, consider this piece of code below. It's orginial without using a "parameter" to substitute the values Q8, agree, "agree": #"Merged Queries" = Table.NestedJo...
ronrsnfld
2 years agoSuper User
You can make use of #sections.
Assume you have a parameter named likerts which contains the text string of the table of interest.
The following function, which you can name whatever you want, will return the relevant table.
()=>
let
#"Queries" = Record.SelectFields(#sections,"Section1")[Section1],
#"likert name" = #"Queries"[likert],
#"likert table" = Record.FieldValues(Record.SelectFields(#"Queries",#"likert name")){0}
in
#"likert table"
This function will return an error if the table does not exist.