Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all
help!!!!!!!!!!
can't get the RLS to work.
i tried even just 1 table with 3 rows and nothing.
can somebody attach 1 small powerbi file with basic RLS which works?
i will take this file and implement it to my DB.
thanks in advanced...!
Solved! Go to Solution.
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
thanks.
i talked about RLS with username() permissions...
when u have table with users, which is connected to transaction table,
and when user enter - he sees only the record on his username.
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?
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
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
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??
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
User | Count |
---|---|
140 | |
113 | |
104 | |
76 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |