Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rob_vander2
Helper II
Helper II

Hide Field parameter dimension using User role

Hi All,

 

I have user table as below

UserGroup
abc@company.comA
xyz@company.comB

 

Then I have created field parameter as below. 

 

Dimension = {
    ("Country", NAMEOF('Orders'[Country]), 0,"A"),
    ("State", NAMEOF('Orders'[State]), 1, "B")
}
 
I have created a table with Dimension parameter and sales measure.
What I want is if user with Group "A" logs in he should see Country in report and user with Group "B" should see State in report.  I want this to be dynamic.
1 ACCEPTED SOLUTION
speedramps
Super User
Super User

Dowload a PBIX solution from my Onedrive

Click here 

 

Build your relationships like this and then click Manage Roles

speedramps_1-1738677418446.png

 

Create a security role

speedramps_2-1738677489313.png

Test by clicking on View As and sleecet the role and the Other User

speedramps_3-1738677652891.png

 

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 

 

 

 

 

View solution in original post

5 REPLIES 5
speedramps
Super User
Super User

Hi @rob_vander2 

 

Please can you click the thumbs up button and accept the solution.

 

I provide a solution with example and text screen shots proving it works 100%.

 

Please follow the instruction I provided to build and test RLS in Power BI Desktop first. If it does not work in Desktop then copy the logic more carefully and it will work !

 

Then publish to Power Bi Servce and add the users to the security role.  Learn how here

https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security#validating-the-ro...

 

Then validate it in Power BI Service using "Test as role". Learn how here
 https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security#validating-the-ro... 

 

If it does not work then it is because your users have the incorrect permissions.

RLS only restricts data access for users with Viewer permissions. It doesn't apply to Admins, Members, or Contributors. Go into the Power Bi Service and look what access the user have to the workspcae and dataset, and edit them accordingley.

https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security#validating-the-ro...

 

Then ask the users to try with their own login.

If it does not work, then wait at least 1 hrs for the Power BI Service to replicate the permissions changes in the cloud.

 

If it still does not work then check the user error message carefully. Do they have license?

 

Thanks

 

speedramps
Super User
Super User

 

Build and test in Power BI Desktop first ok.

 

If it then does not work in Power BI Service then there are usually 2 reasons:-

 

The users should only have Read access to the dataset and workspace, otherwise they can override RLS.

 

The users needs adding as a member to the security group.

 

  • Please accept the solution I gave you because it does work 100%. You are now drifting into a new question about Read access. Thanks.

 

Learn about RLS here

https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security

 

 

speedramps
Super User
Super User

Dowload a PBIX solution from my Onedrive

Click here 

 

Build your relationships like this and then click Manage Roles

speedramps_1-1738677418446.png

 

Create a security role

speedramps_2-1738677489313.png

Test by clicking on View As and sleecet the role and the Other User

speedramps_3-1738677652891.png

 

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 

 

 

 

 

@speedramps  I did this but when I publish this and user login in power bi service, they still see both dimension from field parameter

bhanu_gautam
Super User
Super User

@rob_vander2 

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.

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.