<?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: Complex RLS in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Complex-RLS/m-p/71082#M2357</link>
    <description>&lt;P&gt;Hi Sam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When looking at this it looks like these are for reading a parent child releationship.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to restrict the rows processed by power bi in a similar way that [column]=usernam() adds on to the where clause&lt;/P&gt;</description>
    <pubDate>Thu, 22 Sep 2016 18:25:03 GMT</pubDate>
    <dc:creator>Watty</dc:creator>
    <dc:date>2016-09-22T18:25:03Z</dc:date>
    <item>
      <title>Complex RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Complex-RLS/m-p/70152#M2310</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have watched the following video and got this working great,&lt;/P&gt;&lt;P&gt;Summarising what I think is happening, Power BI is smart enough to know the schema and add&amp;nbsp;on the extra where clause using the dax filter [column_name]=username ( where the username is passed in from the token )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now our requirement for the retriction of data is more complex (sql below) is this possible ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help would really be appeciated for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="" href="https://channel9.msdn.com/Blogs/Seth-Juarez/Power-BI-Embedded-with-Josh-Caplan" target="_blank" rel="nofollow noopener noreferrer"&gt;https://channel9.msdn.com/Blogs/Seth-Juarez/Power-BI-Embedded-with-Josh-Caplan&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;;WITH RelationsCTE (ParentId, Id)&lt;BR /&gt;AS&lt;BR /&gt;(&lt;BR /&gt;SELECT&lt;BR /&gt;nodes_assigned_to_user.ParentId&lt;BR /&gt;,nodes_assigned_to_user.Id&lt;BR /&gt;FROM Client.Node AS nodes_assigned_to_user&lt;BR /&gt;WHERE&lt;BR /&gt;ISNULL(Root_Id, Id) = @ClientId&lt;BR /&gt;AND Id IN (&lt;BR /&gt;SELECT nur.Node_Id&lt;BR /&gt;FROM account.NodeUserRole nur&lt;BR /&gt;INNER JOIN account.UserRole ur ON nur.UserRole_Id = ur.Id&lt;BR /&gt;WHERE ur.[User_Id] = @UserId&lt;BR /&gt;)&lt;BR /&gt;UNION ALL&lt;BR /&gt;SELECT child_nodes.ParentId, child_nodes.Id&lt;BR /&gt;FROM Client.Node AS child_nodes&lt;BR /&gt;INNER JOIN RelationsCTE AS related_nodes&lt;BR /&gt;ON child_nodes.ParentId = related_nodes.Id&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;SELECT *&lt;BR /&gt;FROM client.Node&lt;BR /&gt;WHERE Node.Id IN (SELECT Id FROM RelationsCTE)&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 20:20:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Complex-RLS/m-p/70152#M2310</guid>
      <dc:creator>Watty</dc:creator>
      <dc:date>2016-09-20T20:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Complex RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Complex-RLS/m-p/70951#M2345</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/14352"&gt;@Watty﻿&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DAX provides five functions to manage data that is presented as a parent-child hierarchy in models. You could take a look at &lt;A href="https://msdn.microsoft.com/en-us/library/gg492192.aspx" target="_self"&gt;it&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2016 12:27:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Complex-RLS/m-p/70951#M2345</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2016-09-22T12:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Complex RLS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Complex-RLS/m-p/71082#M2357</link>
      <description>&lt;P&gt;Hi Sam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When looking at this it looks like these are for reading a parent child releationship.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to restrict the rows processed by power bi in a similar way that [column]=usernam() adds on to the where clause&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2016 18:25:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Complex-RLS/m-p/71082#M2357</guid>
      <dc:creator>Watty</dc:creator>
      <dc:date>2016-09-22T18:25:03Z</dc:date>
    </item>
  </channel>
</rss>

