Forum Discussion
Web gateway source scheduled with parameter
Hello, i have a report published in powerbi where the report is connecting to an api call to get some data. This api call is driven by a parameter inside the report.
When publishing this apicall has to be added to the gateway sources in order to be selected in connections.
I can see in settings the parameter set in the report but how can i set the datasource to user this parameter like
Data Source name : myService
Data Source Type: Web
URL: https://myService?myparam=5
Where 5 comes from the report as parameter.
https://myService?param1=#MyPar
is not working when the parameter name is MyPar in the report with value 5.
I did try to fix the report using the relative path so i have a query like:
= Json.Document(Web.Contents("https://myServer/myservice/api",[RelativePath="docStatus",Query=[MyPar=Text.From(docId)]]))
Inside the powerbi desktop this works fine.
In the powerbi service it is asking to add it to gateway.
Then in the url it placed only
"https://myServer/myservice/api" and then i have 404 error on checking connection to the gateway. the message is
"Unable to connect to the data source undefined."
2 Replies
- v-luwang-msftCommunity Support
Hi kyrpav ,
You could try the below:
- Set Privacy Level to Organizational
- Made sure all reports are refreshed at different times
- Created another on-premise gateway to split the load
- Created database tables rather than views to reduce processing between PowerBI and MSSQL
- Ensured both desktop and gateway has the latest version installed at all times
Similar question:
'Unable to connect to data source undefined'
Unable to connect to the data source undefined
Unable to Connect to Data Source Undefined
Wish it is helpful for you!
Best Regards
Lucien
- v-luwang-msftCommunity Support
HI kyrpav ,
Has your problem been solved, if so, please consider Accept a correct reply as the solution to help others find it.
Best Regards
Lucien