Forum Discussion
Pass measure to SQL Query in Power BI
One solution we found for RLS is to bring in another table with the correct parameters( IE. Username, RegionKey). In our case, we used Username (AD Username) and then embedded the dashboard in our sharepoint site. We then used Sharepoint to pass the URL with the username. This allowed us to display the correct dashboard to the correct user.
Below is the URL we are using to filter the dashboard. Add this after the dashboard path
?rs:Embed=true&filter=TableName%2FPARAMETER%20eq%20%27USERNAME%27
So in your exact case, you'd want something like
(qualified server path)?rs:Embed=true&filter=table1%2Ffield1%20eq%20%27UserName%27
Hope this helps.
Kevin
- mqassas8 years agoNew Member
Thank you for your reply!
- Is RLS is available for Power BI Report Server?!
- Also, I don't think it's double to add the username in the URL, I need to automatically detect the current user!
- davidm58 years agoHelper I
If you're connecting to SQL Server, you might try using SYSTEM_USER as described here:
- mqassas8 years agoNew Member
Thank you for your reply, I really appreciate this workaround!
But unfortunately this is not working because I can't control the data source authentication type for Power BI report, I can do this for the normal SSRS report but for Power BI I can't and I must specify username and password to can access the database during configuring "Get Data" In Power BI DeskTop, so in this case, the current user will be the same user that has been provided.
Please, If you have any workaround for this please post it!