Forum Discussion

malikirfan28's avatar
malikirfan28
Helper II
7 years ago
Solved

Dynamic Data Source based on dynamic parameter from login user session

Hi All,

We have mulitple clients with separate copy of exactly same database schema on same SQL Server. I know how to create parameterized query within Power BI Desktop and then build separate copy of dashboard for each client using their database and upload all pbix files to power bi service (app.powerbi.com).

Please note, we are using these dashboards in our custom application (as embedded) so we show specific dashboards only to respective clients/users.

However as clients are increasing so it is hectic to keep uploading multiple files even dashboard is exactly same (using exact same visuals) and if we have to change any visual then we will have to update (re-build) all copies of dashboards and re-upload.

 

So is there anyway that we upload only single Dashboard (pbix) file to Power BI Service which will be using direct query via Gateway and then pass those Query Parameters (like Database name) dynamcially from Custom application to Gateway (based on user session) and Gateway fetch data from given database name (instead of static connection string)?

 

Please need an expert openion.

7 Replies

  • Hi there

    What I would suggest doing is to have all the data in one SQL Server table or ideally build an SSAS or AAS tabular model. You can then have all the reports accessing this tabular model.

    You can then configure Row Level Security and based on which user logs in, you can then only show them their data.
    This will allow you to only create 1 dashboard and 1 report.
    • malikirfan28's avatar
      malikirfan28
      Helper II

      Hi GilbertQ ,

      Thank you for your message. How can we use this RLS with custom application? As mentioned before, we have App Workspace in Power BI Service through which we are embedding dashboards into our Custom Applications (ASP.Net MVC). So how can we pass this Role information from Custom Application to Dashboard?

       

      2nd: I believe, RLS feature will work if Dashboard is using Direct Query. Right? 

       

      3rd: These dashboards will be readonly (we manage it through our custom application) however our App Workspace is configure to allow end users for Edit/Update dashboards (not these but other type of dashboards). So will it have any implication?

       

      Thanks