Forum Discussion
Can't Get RLS to Work
- Anonymous9 years ago
Hi yogevz,
My suggest is use an intermediate table to link these tables.
Reference link:
How to create many to many relationships
Regards,
Xiaoxin Sheng
Hi yogevz.
At desktop side, you should use "view as role" to enable the rls affect.
Regards,
Xiaoxin Shneg
this is what i did - but it doesn't work...
see picture 1 - data + i inserted the user as role to see data,
u can see also in the lower part the user i am using.
see picture 2 - i get no data. and in the lower part - u can see again the user i used...
what i am missing?
- Anonymous9 years agoNot applicable
Hi yogevz,
Can you share us a sample file to test?
Below is my sample:
Role table:
Measures:
USERNAME = USERNAME()
Role = LOOKUPVALUE(Sheet2[User],Sheet2[Login],USERNAME()) // look up the role.
RLS formula:
if(
ISERROR(SEARCH("SalesManager", [Role]))=FALSE(),
[SalesManager]=[Role]
,
[SalesMan]=[Role]
)Regards,
Xiaoxin Sheng
- yogevz9 years agoHelper II
attach sample file.
in this file, only when i do as role (attach picture also), then i get 1 row (i am not sure this is what i need to do),
but if this is what i need to do - it doesn't work in the server - when i enter in a different user i need to see
0 rows, but i see all rows...
attach url dropbox to the powerbi file...
https://www.dropbox.com/s/nfup6y1p0x62yd5/test%20for%20RLS6.pbix?dl=0
- yogevz9 years agoHelper II
Hi
i succeed doing the RLS.
now - new issue.
from one side - users and department
from second side - fact table, every department has several of rows (table has history).
now - i can't create join between the tables!
powerbi doesn't permit join between 2 tables with many values (many to many).
what now??