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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
TusharGaurav
Helper III
Helper III

How to hide visual for specific users

Hi Expert,

 

In my report page, there are 1 pie chart, 1 line chart and 1 matrix.

I need to hide the matrix for a specific user, so that when he access the report from power bi service, he can view only pie chart and line chart but not the matrix.

Can we achieve the same in power bi?

Thanks and Regards,

Tushar Gaurav

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@TusharGaurav  You can use RLS
Go to the "Modeling" tab.
Click on "Manage Roles."
Create a new role and define the DAX filter that will be used to control access.

 

Publish your report to Power BI Service.
Go to the dataset settings in Power BI Service.
Click on "Security."
Assign users to the roles you created.

 

Use the DAX filter to control the visibility of the matrix visual. You can create a measure that returns a value based on the user's role and use this measure to control the visibility of the matrix.

IsMatrixVisible = IF(USERPRINCIPALNAME() = "specificuser@domain.com", 0, 1)




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

Proud to be a Super User!




LinkedIn






View solution in original post

4 REPLIES 4
DineshYadl
Helper I
Helper I

Hi @TusharGaurav 

 

By using RLS you can hide visual for specific users. With the help of USERNAME() DAX function. This function will capture the domain and username from the credentials given to the system at connection time.

 

DAX syantax 

 

username= IF(CONTAINS(UsersTable,UsersTable[login], USERNAME()), "Allowed", BLANK())

 

In model view ---> Manage roles ---> create Role (User) with the help of USERNAME() DAX function

DineshYadl_0-1742565394708.png

 

For data validation click on View as --> select the "User" role 

 

It will restrict the data based on the domain name and username of the system.

 

Thanks 

Thanks for your response.

Can you please share the pbix file on tushargaurav1@gmail.com.

It will be helpful

Deku
Super User
Super User

I think the best you can do is row level security, but the user will get a error on the matrix, rather than it being hidden. I assume the reason for hiding is security related.

 

If you had a app then you could think about audiences, with a secure report and a more general report


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
bhanu_gautam
Super User
Super User

@TusharGaurav  You can use RLS
Go to the "Modeling" tab.
Click on "Manage Roles."
Create a new role and define the DAX filter that will be used to control access.

 

Publish your report to Power BI Service.
Go to the dataset settings in Power BI Service.
Click on "Security."
Assign users to the roles you created.

 

Use the DAX filter to control the visibility of the matrix visual. You can create a measure that returns a value based on the user's role and use this measure to control the visibility of the matrix.

IsMatrixVisible = IF(USERPRINCIPALNAME() = "specificuser@domain.com", 0, 1)




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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors