When I setup Row Level Security in a Datamart and then run the View As to test the roles, the first role I test works as expected. Any subsequent roles that I test during that session do not filter as expected and I either get all rows in the datamart or it still caches the original View as Role settings I tested first. If I close out that session and try again, this time opening another role under View As, the first one works, but when I switch to subsequent roles, it does not filter correctly.
Pictures are below for reference.
Roles setup in the Datamart
When I do View as Role and start with the AdventureWorksLT role, it works as expected...
When I swtich to the WideWorldImporters role, it still shows the filter for AdventureWorksLT and yes I clicked OK and reviewed the result set. This screenshot is after reviewing the result set and clicking View as Role again.
If I close out of the Datamart, refresh my browser and come back in and try WideWorldImports first, it filters as expected.