Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi there,
I have two tables. They both contain a list of data sources that my code loops through
Currently my setup is like so
let Source = Table_A,
#"Added Custom" = Table.AddColumn(Source, "Custom", each myFunction_f([mySources])),
with me manually changing the value to Table_B when I am ready to push to production. However, I have a dozen or so queries that I am having to manually change. Ideally i would like to do this via a parameter which would allow me to toggle between Table_A and Table_B.
I have the below setup, but it's erroring out. How would I correctly do this?
Desired Code:
let Source = myParam, #"Added Custom" = Table.AddColumn(Source, "Custom", each myFunction_f([mySources])),
Error message when using 'Desired Code'
Solved! Go to Solution.
You may use Record.Field function.
Source = Record.Field(#shared, myParam),
You may use Record.Field function.
Source = Record.Field(#shared, myParam),