<?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: Help with logic on row level security in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2749854#M84810</link>
    <description>&lt;P&gt;Thanks Paul.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if the above logic will work.&amp;nbsp; I need to add the filter to the Entity B table in the Mangage Roles section.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2022 09:30:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-09-06T09:30:05Z</dc:date>
    <item>
      <title>Help with logic on row level security</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2748287#M84721</link>
      <description>&lt;P&gt;Please can someone help with a row level security query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following tables&lt;/P&gt;&lt;P&gt;EntityA&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;User&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;A href="mailto:PaulSmith@A.com" target="_blank" rel="noopener"&gt;PaulSmith@A.com&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;A href="mailto:JohnSmith@A.com" target="_blank" rel="noopener"&gt;JohnSmith@A.com&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;A href="mailto:CarlSmith@A.com" target="_blank" rel="noopener"&gt;CarlSmith@A.com&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EntityB&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Name&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Icon&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Z&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;B&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Z&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;C&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;X&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;D&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;X&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;F&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;C&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;ZA&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;C&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a DAX formula to allow row level security for the following logic&lt;/P&gt;&lt;P&gt;If a user is not in Entity A table then the user should be restricted to see only records where Icon &amp;lt;&amp;gt; C.&amp;nbsp; If the user is in Entity A then they will have access to all records in Entity B&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 16:26:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2748287#M84721</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-05T16:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help with logic on row level security</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2748650#M84736</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use this in the RLS filter expression for EntityB&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR _User = USERPRINCIPALNAME()
RETURN
	(_User IN EntityA &amp;amp;&amp;amp; EntityB[Icon] &amp;lt;&amp;gt; "C")
	|| (NOT _User IN EntityA)&lt;/LI-CODE&gt;
&lt;P&gt;Be aware that USERPRINCIPALNAME() can give you a different result in Desktop that it does in PBI Service.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 19:42:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2748650#M84736</guid>
      <dc:creator>PaulOlding</dc:creator>
      <dc:date>2022-09-05T19:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with logic on row level security</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2749854#M84810</link>
      <description>&lt;P&gt;Thanks Paul.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if the above logic will work.&amp;nbsp; I need to add the filter to the Entity B table in the Mangage Roles section.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 09:30:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2749854#M84810</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-06T09:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with logic on row level security</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2749921#M84814</link>
      <description>&lt;P&gt;I'm receiving the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The number of arguments is invalid.&amp;nbsp; Function CONTAINSROW must have a value for each column in the table expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it because the User field is not specified in Entity A?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 09:55:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2749921#M84814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-06T09:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with logic on row level security</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2750235#M84825</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ah, yes.&amp;nbsp; Looks like it's the wrong way round.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR _User = USERPRINCIPALNAME()
RETURN
	(_User IN EntityA )
	|| ((NOT _User IN EntityA) &amp;amp;&amp;amp; EntityB[Icon] &amp;lt;&amp;gt; "C")&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;.. here's the results&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 12:17:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-logic-on-row-level-security/m-p/2750235#M84825</guid>
      <dc:creator>PaulOlding</dc:creator>
      <dc:date>2022-09-06T12:17:19Z</dc:date>
    </item>
  </channel>
</rss>

