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

Applying Row level Security to report

I have two tables and has relationship shown below

EalTim_0-1649578617318.png

How can I apply RLS so at to filter through UserEmail or user when user log in and by seeing only the VendorName reports?

I have tried to create RLS on manage role using this below

vendor = LOOKUPVALUE(report_item_analysis_Measures_v1[Vendor Name],Vendor[user],USERNAME())

I am getting this error "Expression refers to multiple columns. Multiple columns cannot be converted to a scalar value" in manage roles.

Please help

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Anonymous 

Your filter on the ItemTable would be something like this.

 

 

ItemTable[VendorName] =
	LOOKUPVALUE (
		Vendor[VendorName],
		Vendor[VendorName], ItemTable[VendorName],
		Vendor[UserName], USERNAME()
	)

 

 

I have attached a sample file for you to look at.  You can see the tables are not joined and you can test the role using 

Modeling > View As

2022-04-10_2-15-23.jpg

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

@Anonymous 

Your filter on the ItemTable would be something like this.

 

 

ItemTable[VendorName] =
	LOOKUPVALUE (
		Vendor[VendorName],
		Vendor[VendorName], ItemTable[VendorName],
		Vendor[UserName], USERNAME()
	)

 

 

I have attached a sample file for you to look at.  You can see the tables are not joined and you can test the role using 

Modeling > View As

2022-04-10_2-15-23.jpg

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.