<?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: Row Level Security and Roles in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-Level-Security-and-Roles/m-p/3257007#M120312</link>
    <description>&lt;P&gt;Hi Pat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Went back to CONTAINSSTRING and worked perfectly as far as I have tested it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issues was I was running on Analysis Services 2017 - upgraded to 2022 and it worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think 2019 would work as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
    <pubDate>Sun, 28 May 2023 23:37:20 GMT</pubDate>
    <dc:creator>andrewnzinuk</dc:creator>
    <dc:date>2023-05-28T23:37:20Z</dc:date>
    <item>
      <title>Row Level Security and Roles</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-Level-Security-and-Roles/m-p/3256663#M120290</link>
      <description>&lt;P&gt;I have a table called Cost_Centre, within that table I have a column called UPN which is the UPN of the cost_Centre manager. This column can have multiple values in it. For example I have placed the following in the UPN colum :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:Test1@abc.com" target="_blank"&gt;james@abc.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:mary@abc.com" target="_blank"&gt;mary@abc.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:Cindy@abc.com;" target="_blank"&gt;Cindy@abc.com;&lt;/A&gt;&amp;nbsp;&lt;A href="mailto:Mark@abc.com" target="_blank"&gt;Mark@abc.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:harry@abc.com" target="_blank"&gt;harry@abc.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I login as &lt;A href="mailto:Mark@abc.com" target="_blank"&gt;Mark@abc.com&lt;/A&gt;&amp;nbsp;- I want to only see rows that Mark can see . I have created a role and added a filter on the UPN column - and was hoping to restrict rows based on the UPN value in the column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works when I only have a single user in the UPN column - but sometimes I need more than one person :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When logged in as Mark this works with Mark@abc.com as the only value in the UPN column for the row :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=dim_CostCentre[UPN] = USERPRINCIPALNAME()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have tried this with the string with multiple users&amp;nbsp; - and cannot make it work :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF(CONTAINS('dim_CostCentre',dim_CostCentre[UPN],USERPRINCIPALNAME())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When logged in as Mark&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="65325" data-lia-user-login="abc" class="lia-mention lia-mention-user"&gt;abc&lt;/a&gt;.com no rows are visible. I think the contains is working on the column and not the row. Any ideas on how I can make this work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 08:39:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-Level-Security-and-Roles/m-p/3256663#M120290</guid>
      <dc:creator>andrewnzinuk</dc:creator>
      <dc:date>2023-05-28T08:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security and Roles</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-Level-Security-and-Roles/m-p/3256768#M120296</link>
      <description>&lt;P&gt;Try this instead for your RLS filter. If performance poor, you could alway split your text into a list with Text.Split and expand that list to new rows and use your simpler filter expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CONTAINSSTRING(&lt;SPAN&gt;dim_CostCentre[UPN], USERPRINCIPALNAME() )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Pat&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 14:22:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-Level-Security-and-Roles/m-p/3256768#M120296</guid>
      <dc:creator>ppm1</dc:creator>
      <dc:date>2023-05-28T14:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security and Roles</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-Level-Security-and-Roles/m-p/3256945#M120308</link>
      <description>&lt;P&gt;Hi Pat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried that - unfortunately my Visual Studio does not recognise that DAX function. I am not sure if it relates to my version of Analysis Services - which is SQL 2017. I was going to upgrade and see if CONTAINSSTRING will be accepted, is it a relatively new function . Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 20:22:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-Level-Security-and-Roles/m-p/3256945#M120308</guid>
      <dc:creator>andrewnzinuk</dc:creator>
      <dc:date>2023-05-28T20:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Row Level Security and Roles</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-Level-Security-and-Roles/m-p/3257007#M120312</link>
      <description>&lt;P&gt;Hi Pat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Went back to CONTAINSSTRING and worked perfectly as far as I have tested it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issues was I was running on Analysis Services 2017 - upgraded to 2022 and it worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think 2019 would work as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 23:37:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Row-Level-Security-and-Roles/m-p/3257007#M120312</guid>
      <dc:creator>andrewnzinuk</dc:creator>
      <dc:date>2023-05-28T23:37:20Z</dc:date>
    </item>
  </channel>
</rss>

