cancel
Showing results for 
Search instead for 
Did you mean: 
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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors