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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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