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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AlexGurovich
Helper II
Helper II

Slicer Options depending on logged in User

Hi Everyone:
 
I would like a Slicer that I have in one of my pages to expose (or not expose)  products from the PRODUCTS Table based on the USER that is logged in from the Power BI service. So, for some USER, some subset of PRODUCTS should be exposed, and for some other USER another subset of PRODUCTS should be exposed.
 
How do I do that?  (NOTE:  I think RLS won't work for me, because RLS will expose (or not expose) those same PRODCUTS from all other visualizations (other graphics, charts, etc) , that shouldn't be impacted by who is the USER. )
 
AlexGurovich_0-1625953354448.png

 

 
 
1 ACCEPTED SOLUTION
daxer-almighty
Solution Sage
Solution Sage

Create a table (which will be hidden in the model) with pairs of (ProductID, Username). Username will be the user's email that they connect with, which you can return using a DAX function, probably Username() or something like this. This is the mapping you want to occur. Then connect Products via ProductID to this table with bi-dir filtering. Then put a slicer on the canvas as you would normally do using the column from Products. Then create a measure

 

[ProductIsOKToShow] =
var ProductIsOKToShow_ =
    NOT ISEMPTY(
        filter(
            ProductToUserBridgeTable,
            ProductToUserBridgeTable[UserName] = USERNAME()
        )
    )
return
    1 * ProductIsOKToShow_

 

and filter the slicer via Filter Pane where the condition [ProductIsOKToShow] is 1.

View solution in original post

2 REPLIES 2
AlexGurovich
Helper II
Helper II

@daxer-almighty Excellent, Kudos. Worked! Fantasic, and thanks for the good help.

daxer-almighty
Solution Sage
Solution Sage

Create a table (which will be hidden in the model) with pairs of (ProductID, Username). Username will be the user's email that they connect with, which you can return using a DAX function, probably Username() or something like this. This is the mapping you want to occur. Then connect Products via ProductID to this table with bi-dir filtering. Then put a slicer on the canvas as you would normally do using the column from Products. Then create a measure

 

[ProductIsOKToShow] =
var ProductIsOKToShow_ =
    NOT ISEMPTY(
        filter(
            ProductToUserBridgeTable,
            ProductToUserBridgeTable[UserName] = USERNAME()
        )
    )
return
    1 * ProductIsOKToShow_

 

and filter the slicer via Filter Pane where the condition [ProductIsOKToShow] is 1.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.