Forum Discussion
Role Level Security
- 3 months ago
Hi Phantom1980,
You can create a mapping table with type of access to be provided.
Refer Sample .pbix file for reference. (Tested with View role as)
if you have the heirarchial data then you can explore PATH and PATHITEMS functions
π I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
π‘ Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
π As a proud SuperUser and Microsoft Partner, weβre here to empower your data journey and the Power BI Community at large.
π Curious to explore more? [Discover here].
Letβs keep building smarter solutions together!
You need a mapping table that defines which user can see which names. This gives you full flexibility without creating a separate role for every user.
1) Create a new table in Power Query (or as an Excel/CSV source) called RLS_Mapping with two columns: UserEmail and AllowedName.
2) Create a relationship from RLS_Mapping[AllowedName] to your stats table's Name column (many-to-one, single direction from RLS_Mapping to stats table).
3) In Power BI Desktop, go to Modeling β Manage roles β New role. Name it something like "DataAccess". On the RLS_Mapping table, add this DAX filter:
[UserEmail] = USERPRINCIPALNAME ()
4) Publish to the Power BI Service. Go to the semantic model β Security β assign all users to the "DataAccess" role.