Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I've set up many ODBC data sources on my local machine. I am attempting to run a query against one or many databases at the same time. I'm able to hard code this, but i would like to automate it, and cannot find the solution. I made my SQL statement into a paramater and can pass that without issue, and I've built a listbox to select 1 or many connections and pass that to a delimited string. I've tried passing the value "Odbc.Query("dsn=db1", SetQuery) & Odbc.Query("dsn=db2", SetQuery)" as a variable, but this returns plain text, the functions are not called when pass as variables. Is there a method to loop through and connect only to those sources that ive choosen?
let
Source = Odbc.Query("dsn=db1", SetQuery) & Odbc.Query("dsn=db2", SetQuery)
in
Source
Thanks,
Hi
You may need use each DB name as one of the list values of the parameter which can be used in Power Query (Query Editor->Advanced Editor) and concatenate into entire MDX query string to retrieve data.
For more details, please refer to article below:
Dynamic data masking and query parameters
Best Regards
Maggie
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |