<?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 Row Level Security - Bridge Table in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Row-Level-Security-Bridge-Table/m-p/919505#M22190</link>
    <description>&lt;P&gt;I may be close to a solution but require some help with the DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am have created two Security Roles: City and Continent and I have added in a Level column to my bridge table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to filter the DAX LOOKUPVALUE script above to only look at the rows where LEVEL = "City". e.g. something like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[SalesCity] =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LOOKUPVALUE(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'UserOrderBridge'[City] &lt;STRONG&gt;WHERE LEVEL= "City",&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'UserList'[UserName],UserPrincipalName(),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'UserOrderBridge'[City] &lt;STRONG&gt;WHERE LEVEL= "City",&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Orders[SalesCity]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2020 11:13:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-02-03T11:13:11Z</dc:date>
    <item>
      <title>Dynamic Row Level Security - Bridge Table</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Row-Level-Security-Bridge-Table/m-p/918829#M22184</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been watching videos and reading all the blog posts I can about Dynamic Row Level Security in Power BI but I cannot get an answer to my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem:&lt;/P&gt;&lt;P&gt;I have the following bridge table in my data model. It is joined to the Orders table on City. It is also joined to a UserList table (which contains the users email address) on UserID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;UserID&lt;/TD&gt;&lt;TD&gt;Continent&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;City&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Europe&lt;/TD&gt;&lt;TD&gt;NULL&lt;/TD&gt;&lt;TD&gt;NULL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Asia&lt;/TD&gt;&lt;TD&gt;Thailand&lt;/TD&gt;&lt;TD&gt;Bangkok&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Asia&lt;/TD&gt;&lt;TD&gt;China&lt;/TD&gt;&lt;TD&gt;Beijing&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Asia&lt;/TD&gt;&lt;TD&gt;Thailand&lt;/TD&gt;&lt;TD&gt;Bangkok&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Africa&lt;/TD&gt;&lt;TD&gt;South Africa&lt;/TD&gt;&lt;TD&gt;Cape Town&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;User 1 should see data from the Orders table for Bangkok and all cities in Europe.&lt;/P&gt;&lt;P&gt;User 2 should only see&amp;nbsp;data from the Orders table for Beijing, Bangkok and Cape Town.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following DAX script works correctly for filtering the Orders table for User 2 but only shows Bangkok for User 1. I have entered it under the Orders table in the Manage Roles window.&lt;/P&gt;&lt;P&gt;[SalesCity] =&lt;BR /&gt;LOOKUPVALUE(&lt;BR /&gt;'UserOrderBridge'[City],&lt;BR /&gt;'UserList'[UserName],UserPrincipalName(),&lt;BR /&gt;'UserOrderBridge'[City],&lt;BR /&gt;Orders[SalesCity]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my issue is how do I change this script to pull back &lt;STRONG&gt;all of Europe and Bangkok for User 1?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I tried to use a IF(ISBLANK() statement but that didn't work.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If i create another Role for Continent, itll bring back all the data for Asia and africa for User2.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am pretty new to DAX so any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 02 Feb 2020 15:59:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Row-Level-Security-Bridge-Table/m-p/918829#M22184</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-02T15:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Row Level Security - Bridge Table</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Row-Level-Security-Bridge-Table/m-p/919505#M22190</link>
      <description>&lt;P&gt;I may be close to a solution but require some help with the DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am have created two Security Roles: City and Continent and I have added in a Level column to my bridge table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to filter the DAX LOOKUPVALUE script above to only look at the rows where LEVEL = "City". e.g. something like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[SalesCity] =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LOOKUPVALUE(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'UserOrderBridge'[City] &lt;STRONG&gt;WHERE LEVEL= "City",&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'UserList'[UserName],UserPrincipalName(),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'UserOrderBridge'[City] &lt;STRONG&gt;WHERE LEVEL= "City",&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Orders[SalesCity]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 11:13:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Row-Level-Security-Bridge-Table/m-p/919505#M22190</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-03T11:13:11Z</dc:date>
    </item>
  </channel>
</rss>

