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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Filter to current user by default

I'm trying to enhance a report such that, when the user first opens it, it is filtered to just show their data, but they can then easily flip between just their data, and that for everyone.

 

I've tried using USERPRINCIPALNAME() to create a measure, which works with only limited success, as I can't then use this measure in a slicer so that it applies as a filter accross the whole report.

 

User Scope = if(
    MAXX(
        KEEPFILTERS(VALUES('Table1'[UserName])),
        CALCULATE(MIN('Table1'[UserName]))
    ) = USERPRINCIPALNAME(),
    "Just Me",
    "Everyone"
)

 

Other methods I've seen discussed mention row-level security - this does not sound suitable in my case, as I am not looking to restrict access.

 

Any suggestions?

2 REPLIES 2
Anonymous
Not applicable

You can't have a measure in a slicer. A slicer is taking its data from a table.

Anonymous
Not applicable


@Anonymous wrote:

You can't have a measure in a slicer. A slicer is taking its data from a table.


Yes, that's my understanding, thanks for confirming. USERPRINCIPALNAME() can be used in a measures but not columns, and slicers and page/report level filters can use columns but not measures. It's like there's a wall between what the features/functions will do and the functionality I'm trying to achieve - very frustrating!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.