We have 5 warehouses and 1 unique user in each warehouse. when goods move from warehouse A to warehouse B. Since the row was created by the user at A, when i security filter by useremail, B does not have access to that row .i want the user in B to be able to access all the rows where they are the recipients.
I created a table like this
and used an expression like the one below as a security filter
or([sender]=any(select(user[Warehouse],useremail()=[_thisrow].[useremail])),[recipient]=any(select(user[Warehouse],useremail()=[_thisrow].[useremail])),(USERROLE() = "Admin")).
but its not working fully.
Solved! Go to Solution.
Add a security filter to "Users" table like [UserEmail]=USEREMAIL(). Then you can use security filter like..
OR(
IN([Recipient],Users[Warehouse]),
...
)
Hi @Gokul1
@Gokul1 wrote:
and used an expression like the one below as a security filter
or([sender]=any(select(user[Warehouse],useremail()=[_thisrow].[useremail])),[recipient]=any(select(user[Warehouse],useremail()=[_thisrow].[useremail])),(USERROLE() = "Admin")).
Can you try:
OR(
[sender]=[Warehouse].[Useremail],
[recipient]=[Warehouse].[Useremail],
USERROLE()="Admin"
)
For reference:
it does not work without using select
It all depends on your data structure. Can you please give further details about this? Screenshots of the Data panel is best. Thanks
Add a security filter to "Users" table like [UserEmail]=USEREMAIL(). Then you can use security filter like..
OR(
IN([Recipient],Users[Warehouse]),
...
)
User | Count |
---|---|
44 | |
31 | |
29 | |
14 | |
14 |