Forum Discussion
Integrate or Embedded Power BI dashboard using API to display data
Hi Anonymous
Thanks for your suggestions.
So, to Embed the Power BI Report, We have to create it.
To create Power BI report, we have to use API to call the data based on client. But how we know for which client data need to show and How we select it. Beacuse a user has access of multiple client. And what parameter we need to pass in the API and How will we pass that value.
When we create a Power BI Report then we need to follow the suggested steps.
Kindly suggest how to call API to display required of particular Client, so that we can create power BI
Hi Abhishek_Jain ,
1.Use Power Query parameters to dynamically change the data source in your Power BI report. This allows you to set up a single report template that can switch between different clients' databases. You can define parameters for the database name, server, or any other part of the connection string that changes between clients.
Change the Source of Power BI Datasets Dynamically Using Power Query Parameters - RADACAD
2.When using the Power BI REST API, you can update the parameters of a dataset to change the data source dynamically. For example, if you have a parameter for the client's database name, you can use the Update Parameters API to set this parameter to the desired client's database before refreshing the dataset.
Datasets - Update Parameters - REST API (Power BI Power BI REST APIs) | Microsoft Learn
How do I connect to REST APIs with Power BI? (Part 1) - Data with Dom
Here's a simplified example of how you might update a parameter for a client's database name:
```json
POST https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/Default.UpdateParameters
{
"updateDetails": [
{
"name": "ClientDatabaseName",
"newValue": "Client_DB_Name"
}
]
}
```
Remember to replace `{datasetId}` with the actual ID of your dataset and `Client_DB_Name` with the database name of the client you want to display data for.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.