Forum Discussion
JB_AT
2 years agoHelper III
RLS based on Date Range
Good evening I want to implement a RLS solution that uses USERPRINCIPALNAME and a date range. I have an RLS table that has the Email of the people who are allowed to see certain parts of the ...
- Anonymous2 years ago
Hi JB_AT ,
You can try this:
=IF( Sales[Date] >= RLS[FromDate], IF( Sales[Date] <= RLS[ToDate], IF( RLS[Email] = USERPRINCIPALNAME(), 1, 0 ), 0 ), 0 )Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JB_AT
2 years agoHelper III
Thank you Anonymous
I received an error "Too many arguements were passed to the AND function. The maximum count for the function is 2"
Anonymous
2 years agoNot applicable
Hi JB_AT ,
You can try this:
=IF(
Sales[Date] >= RLS[FromDate],
IF(
Sales[Date] <= RLS[ToDate],
IF(
RLS[Email] = USERPRINCIPALNAME(),
1,
0
),
0
),
0
)
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.