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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

How to show hide a visual when the visual error occurs

Hi Team,

 

We have OLS(object level security) implimented in our report and when an user who doesnt have access to certain object logs in, the visual will show an error message like below.

 

Instead of this error, I would like to hide it or show a message "You dont have necessary permissions to view this data".

 

Any help, how can i achieve this?

LPD280388_0-1622645054957.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found an alternative solution for this.  below is what i did.

1.  I called the same AD group another time and adding into the datasource and creating relationship (getdata --> AD group). this is the same AD group from where the OLS is getting applied

2.  Created a DAX measure in my table to check if the user from table1 is available in AD group table, if yes, give color "#FFFFFF00" else "red". 

3.  Added a rectangle shape on top of the visual which gives error when OLS is applied. 

4.  For this rectangle shape I added the background with function... and added this dax there which changes the color based on the dax.

 

Hope that helps for those looking for an alternative.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous 

You can not only hide tables and columns but also completely hide the model metadata, so your secured tables and columns are obscured in the field list when using reporting tools like Excel or Power BI. A user without permissions cannot access secured metadata objects via DAX or any other method. To viewers that don’t have the requisite permission, the secured tables or columns simply do not exist.

Please refer to the following blog which explains the relevant steps in detail.

https://powerbi.microsoft.com/en-us/blog/object-level-security-ols-now-available-for-public-preview-in-power-bi-premium/

 

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

parry2k
Super User
Super User

@Anonymous unfortunately not at this point. I think there are some ideas on this on the ideas forum. Go and vote for the idea.

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous Great questions. A few weeks ago I tried to solve this for myself but was not able to get anywhere. Since there is no way to detect the user doesn't have permission on an object, you cannot control what to do when there is no permission. At this point, we don't have a choice and live with out of a box error messages which is not very user-friendly.

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k  Thank you for you response.  Is there any other alternative to achieve this. 

Anonymous
Not applicable

I found an alternative solution for this.  below is what i did.

1.  I called the same AD group another time and adding into the datasource and creating relationship (getdata --> AD group). this is the same AD group from where the OLS is getting applied

2.  Created a DAX measure in my table to check if the user from table1 is available in AD group table, if yes, give color "#FFFFFF00" else "red". 

3.  Added a rectangle shape on top of the visual which gives error when OLS is applied. 

4.  For this rectangle shape I added the background with function... and added this dax there which changes the color based on the dax.

 

Hope that helps for those looking for an alternative.

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.