The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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
Solved! Go to Solution.
@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)
Proud to be a Super User! |
|
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
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
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
@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)
Proud to be a Super User! |
|
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
27 |
User | Count |
---|---|
181 | |
83 | |
68 | |
49 | |
46 |