Forum Discussion
Anonymous
9 years agoNot applicable
Changing the Power query SQL Server database settings when moving an Excel workbook
HIi I'm working on creating an excel report that collects data from a local copy of a SQL Server database on my maschine, where I use Power Query to retrieve the data. These are then loaded into ...
- Anonymous9 years ago
Hi Anonymous,
You can refer to below method: use custom function and query parameters to load data.
Custom function:
let Custom= (ServerName as text,DataSource as text, SQLQuery as text) as table=> let Source = Sql.Database(ServerName, DataSource,[Query=SQLQuery]) in Source in CustomParameters:
Use:
let Source = LoadData(ParaServerName,ParaDataSource,ParaQuery) in SourceAfter above steps, you can modify the parameters to change the datasource.
Regards,
Xiaoxin Sheng
Anonymous
9 years agoNot applicable
Hi Anonymous,
You can refer to below method: use custom function and query parameters to load data.
Custom function:
let
Custom= (ServerName as text,DataSource as text, SQLQuery as text) as table=>
let
Source = Sql.Database(ServerName, DataSource,[Query=SQLQuery])
in
Source
in
Custom
Parameters:
Use:
let
Source = LoadData(ParaServerName,ParaDataSource,ParaQuery)
in
Source
After above steps, you can modify the parameters to change the datasource.
Regards,
Xiaoxin Sheng
- Anonymous9 years agoNot applicable
Hello again.
Take a look at suggested method above. If I want to set a SQL SERver authentication together with servername, user name and password, how will these 3 parameters look like?
regards GEir F