Forum Discussion
Is there a way to tell if RLS is filtering a table using dax
As the subject says, I would like to know if a table has been filtered via RLS - it doesnt look like ISFILTERED picks up on RLS filtering. Is this possible and if so how?
Thanks in advance,
Steve
Hi 23Steve32 ,
As I mentioned above, we can't create a measure to judge if the data has been filtered, RLS is applied at the dataset level, the measure is created inside the dataset. For objects inside the dataset, it is just the "full" dataset.
Best Regards,
Teige
4 Replies
- 23Steve32Frequent Visitor
Hi TeigeGao ,
Sorry if I wasn't clear, I own the dataset, I have set up some roles in the desktop which will filter different tables depending upon who is accessing the report in the service.
Basically I have a measure which will look at values from one table if the RLS filters that table other wise it should get the data from another table. I thought the ISFILTERED function would work but it doesnt seem to, so is there a way in a measure to tell if a table has been filtered by RLS?Hope this makes sense,
Steve
- cnonlineRegular Visitor
Try creating a simple count measure to RLS table if your using dynamic RLS. But I guess this will work for the usual RLS scenario as well. (RLS is my bridging table) This worked for me!
RLS Count = DISTINCTCOUNT(RLS[UNAME])And then I created an another switch measure to change a simple icon image in the report. You can do anything with in switch.
RLS Secuity check = SWITCH( TRUE(), [RLS Count]<=1,"Image link to identify RLS applied", [RLS Count]>1,"Image link to identify RLS not applied", "Default image link" )