> Supposing you're talking about the Power BI service, not Power BI Embedded.
Sorry for being unclear, I am talking about Power BI Embedded only.
> What do you mean "hardcoded"? I don't quite get this. AFAIK, I think it is not possible to use one report but pointing to the indivisual datasource according to Who's viewing it in Power BI Service.
This is how I setup the DirectQuery tables in the Edit Query screen in PowerBI Desktop for my PBIX file:
let Source = Sql.Database("mycustomer1.database.windows.net", "reportdb"),...
The hostname is hardcoded in there (as I can see in Advanced Editor) so I can make the charts/tables in PBIX with dummy/test data since I don't import anything (and want to use DirectQuery).
> For Power BI Embedded, you can try to update the connection string and credential every time according to the viewer before they view the report. It looks promising as you can have only one report, however I would have concern about the performance.
This is what I do once per report per customer using https://github.com/Microsoft/PowerBI-Node
When I check the connection string, it shows the updated/correct string for every workspace/dataset. However, the PBIX only works for the originally hardcoded hostname and not for the updated hostnames.
I also use RLS for restricting which users for each customer see which rows and it is working well. But of course, only for the hostname that was originally harcdcoded in the PBIX.