Forum Discussion
Hide Field parameter dimension using User role
- 1 year ago
Dowload a PBIX solution from my Onedrive
Build your relationships like this and then click Manage Roles
Create a security role
Test by clicking on View As and sleecet the role and the Other User
Learn more about row level security and file parameter here
https://learn.microsoft.com/en-us/power-bi/guidance/rls-guidance
https://www.youtube.com/watch?v=NOgTiRitX8o
Please click thumbs up for these suggestions,
and click Accept Solution if any work.
Thank you
Create a measure to dynamically filter the field parameter based on the user's group:
SelectedDimension =
VAR CurrentUser = USERPRINCIPALNAME()
VAR UserGroup = LOOKUPVALUE('User'[Group], 'User'[User], CurrentUser)
RETURN
SWITCH(
UserGroup,
"A", "Country",
"B", "State",
BLANK()
)
Use the measure to filter the field parameter in your report. You can use this measure in a visual level filter or in a calculated column to dynamically show the appropriate dimension based on the user's group.