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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Deek6t8
New Member

USERPRINCIPALNAME() Usage for auto filtering on page activation

Hi I am hoping this is not as hard as I have been finding it.  I am preparign reports for consumption across various organisational levels however there is no desire for anything to be hidden for any user at all (everyone can see everything) so Row level security does not work in this scenario.

For user convenience we would like them to see the data that is relevant to them on opening a report so ideally a filter or set of filters that work along the lines of if the signed in user is present in a specific column of the dataset then filters would be applied to show items only for them with them having the ability to remove or change filters either in filter tab or by a toggle type button perhaps, if they are not present in that column then display them the view with no filters applied.  I have a measure that gives me the logged in username but how to apply that into a filter (even if it has to be at individual visual level) is beyond me as I cannot reference that measure from any column formulas at all without getting the error relating to use of USERNAME() USERPRINCIPALNAME() etc.  Any help would be greatly appreciated.

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @Deek6t8 

 

I have a blog post that does this for you. Please note that while this can hide pages etc, it is not 100% secure. But that sounds like a perfect fit for what you are looking to do!

 

Did you know you can now selectively show report pages for specific users in Power BI? - FourMoo | P...





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

2 REPLIES 2
Deek6t8
New Member

I am digesting your solution and working on how I can twist it slightly to suit my needs I think it may be the way forward.  Thanks for your help with this.

GilbertQ
Super User
Super User

Hi @Deek6t8 

 

I have a blog post that does this for you. Please note that while this can hide pages etc, it is not 100% secure. But that sounds like a perfect fit for what you are looking to do!

 

Did you know you can now selectively show report pages for specific users in Power BI? - FourMoo | P...





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors