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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. 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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors