Forum Discussion
Passing user parameter from dashboard to SQL server through SSAS
You can use roles in the SSAS Tabular Model to achieve this. You'll need to create a role with a DAX Table Filter that uses the USERNAME function. Then, you'll associate any users that need to be filtered with this role.
When a user logs in, they'll first be checked against the roles in SSAS. If they are a member of the role, the data they see is filtered based on the DAX filter definitions in that role. In your case, it'll check the Power BI username against the [User] column in the table.
Check out the tutorial here to get a better understanding: https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-tutorial-row-level-security-onprem-ssas-tabular/
- rohan_misra8 years agoRegular Visitor
Thanks for the reply malagari. However, in this case I will have to add each user individually to the role that is created. I actually want to get around that functionality as the user list is large and ever changing. Any thoughts?
- malagari8 years agoContinued Contributor
I completely understand - I've worked on a project with similar constraints.
In my case, I was working with a client that used Office 365 as their main directory; I was able to create an Office 365 Group and assign it to the role, and then add users to the Office 365 Group when they needed access to Power BI. This still required bulk adding users to a group, but the management could be done by anyone with access to the Office 365 Portal. You may be able to do something similar if you're in an on-prem Active Directory as well.
Good luck - I'll follow this thread for other suggestions.