Forum Discussion
RLS based on Date Range
- 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.
Hi JB_AT ,
You can use the following formula to filter the time data between FromDate and ToDate in the RLS table:
=IF(
AND(
Sales[Date] >= RLS[FromDate],
Sales[Date] <= RLS[ToDate],
RLS[Email] = USERPRINCIPALNAME()
),
1,
0
)
Where 1 means the user can view the row and 0 means the user cannot view the row.
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_AT2 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"
- Anonymous2 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.