Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Applying Row level Security to report

I have two tables and has relationship shown below

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

 

  • 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

1 Reply

  • 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