<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynamic RLS  and all access in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-RLS-and-all-access/m-p/3139774#M112055</link>
    <description>&lt;P&gt;I think the short answer is, yes, you have to add a "No RLS" security group to put them in. Make sure that anyone you have in "No RLS" is not also in any other RLS group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a longer answer if your scenario is:&lt;/P&gt;
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;you are adding all users (via distribution list email, security group, etc.) to a single dynamic RLS group that leverages USERNAME/USERPRINCIPALNAME against a Users table&lt;BR /&gt;AND&lt;/LI&gt;
&lt;LI&gt;your Users table only includes people with some kind of restriction, but people who are in the RLS group but not in the Users table should see&amp;nbsp;all rows&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;In this case, you can create a measure that returns TRUE if the current user is NOT in the Users table, and then just add that to your RLS conditions with an OR.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Say you have a simple dynamic RLS model like so:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;With RLS set up like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then you can create the following measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Super User Check = 
CALCULATE(
    ISEMPTY( Users ),
    TREATAS( { USERPRINCIPALNAME() }, Users[User] ),
    REMOVEFILTERS( Users )
)&lt;/LI-CODE&gt;
&lt;P&gt;And update your RLS accordingly:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Remember, everyone still needs to be added to Dyn RLS in your dataset security settings on the service.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2023 22:45:41 GMT</pubDate>
    <dc:creator>MarkLaf</dc:creator>
    <dc:date>2023-03-17T22:45:41Z</dc:date>
    <item>
      <title>Dynamic RLS  and all access</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-RLS-and-all-access/m-p/3139684#M112048</link>
      <description>&lt;P&gt;Hi Community!&lt;/P&gt;&lt;P&gt;I'm new on this forum, prior i have found all my answers here but today i want to ask my first question. Please forgive me any newbie errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created dynamic rls for my report and it is working for the users that are listed in the roles that are restricted (userprincipalname). Now my question is i have some users that should have access to 100% of the data. So in the rls roles currently i have only listed the people with restricted access, not the people with 100% access as those don't have a relationship to the data.&amp;nbsp;So i figured if i just share the report with them they should have access however when they open the report it says "The report can't be viewed because the underlying dataset uses row-level security (RLS)".&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i share with someone to have access to all?&lt;/P&gt;&lt;P&gt;Or do i need to create a new role for those members?&lt;/P&gt;&lt;P&gt;Let me know if you need additional information in order to understand my request.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 20:20:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-RLS-and-all-access/m-p/3139684#M112048</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-17T20:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic RLS  and all access</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-RLS-and-all-access/m-p/3139700#M112050</link>
      <description>&lt;P&gt;I realize it in one report that I use only the&amp;nbsp;&lt;SPAN&gt;userprincipalname to indentifty the person and than create a own role-access table in the report itself. Example:&lt;BR /&gt;If you have 3 departments X,Y,Z , I but the filter criteria (X,Y,Z) in this table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;USER&lt;/TD&gt;&lt;TD&gt;FilterDepartment&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use this table as a lookup table in my dax expression to filter the different other tables in the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 20:41:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-RLS-and-all-access/m-p/3139700#M112050</guid>
      <dc:creator>andhiii079845</dc:creator>
      <dc:date>2023-03-17T20:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic RLS  and all access</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-RLS-and-all-access/m-p/3139774#M112055</link>
      <description>&lt;P&gt;I think the short answer is, yes, you have to add a "No RLS" security group to put them in. Make sure that anyone you have in "No RLS" is not also in any other RLS group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a longer answer if your scenario is:&lt;/P&gt;
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;you are adding all users (via distribution list email, security group, etc.) to a single dynamic RLS group that leverages USERNAME/USERPRINCIPALNAME against a Users table&lt;BR /&gt;AND&lt;/LI&gt;
&lt;LI&gt;your Users table only includes people with some kind of restriction, but people who are in the RLS group but not in the Users table should see&amp;nbsp;all rows&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;In this case, you can create a measure that returns TRUE if the current user is NOT in the Users table, and then just add that to your RLS conditions with an OR.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Say you have a simple dynamic RLS model like so:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;With RLS set up like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then you can create the following measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Super User Check = 
CALCULATE(
    ISEMPTY( Users ),
    TREATAS( { USERPRINCIPALNAME() }, Users[User] ),
    REMOVEFILTERS( Users )
)&lt;/LI-CODE&gt;
&lt;P&gt;And update your RLS accordingly:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Remember, everyone still needs to be added to Dyn RLS in your dataset security settings on the service.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 22:45:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-RLS-and-all-access/m-p/3139774#M112055</guid>
      <dc:creator>MarkLaf</dc:creator>
      <dc:date>2023-03-17T22:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic RLS  and all access</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-RLS-and-all-access/m-p/3139777#M112056</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;The simple answer worked for me! I added a group called "All access" that doesn't have a relationship. Users i put in there showed all data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate the help!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 23:06:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-RLS-and-all-access/m-p/3139777#M112056</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-17T23:06:57Z</dc:date>
    </item>
  </channel>
</rss>

