<?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: RLS-modelling with several roles and filters to access Facts in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RLS-modelling-with-several-roles-and-filters-to-access-Facts/m-p/2513444#M69783</link>
    <description>&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure how Cross-filtering would help here. Maybe my description is not detailed enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I potentially need 4 different people to have access to the same information at the same time.&lt;BR /&gt;The Cross-filtering would be on a measure for a specific fact table, and tell the model to use a specific relationship (like RLS), but I want to use all relationships at the same time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Patrik&lt;/P&gt;</description>
    <pubDate>Fri, 13 May 2022 12:28:52 GMT</pubDate>
    <dc:creator>Puttsson</dc:creator>
    <dc:date>2022-05-13T12:28:52Z</dc:date>
    <item>
      <title>RLS-modelling with several roles and filters to access Facts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RLS-modelling-with-several-roles-and-filters-to-access-Facts/m-p/2503517#M69272</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been struggeling for a few weeks with my PBI-model. I have a solution that is working today, but it completely killed the performance of the report. So I need to find another way around my issue, and some dynamic RLS might be the way to go.&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;I have a LinkTable which contains LinkTableId to connect to the FactTables. Each LinkTableId has ActivityAdminId, ActivityBrokerId, ResponsibleAdminId, ResponsibleBrokerId (different roles/people/users that are related to the specific row in the facttable). This is 4 different people/users (the same user could have all 4 roles at the same time on the same LinkTableId).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need is to filter the linktable based on which user is using the report. I've written this RLS-DAX-code on my LinkTable:&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;[ResponsibleBrokerId]&lt;BR /&gt;IN CALCULATETABLE (&lt;BR /&gt;VALUES ( 'AccessTestTable'[BrokerId] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'AccessTestTable'),&lt;BR /&gt;[UserPrincipalName] = USERPRINCIPALNAME()&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;||&lt;BR /&gt;[ActivityBrokerId]&lt;BR /&gt;IN CALCULATETABLE (&lt;BR /&gt;VALUES ( 'AccessTestTable2'[BrokerId] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'AccessTestTable2'),&lt;BR /&gt;[UserPrincipalName] = USERPRINCIPALNAME()&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far all is good.&lt;/P&gt;&lt;P&gt;Now in my model, each use can have different type of access. The user should in some context have access to other users. This is&amp;nbsp; today handled with a filter on the whole report (or a specific page / data), which comes from my Access-table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've been trying to adjust my RLS-DAX to use this information, but so far it doesn't care about my page/report-filter - something like this. It did work if I replace "IN CALC...." with just = 1 (the value, but then it's not dynamic as I want it)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Summary of my needs:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The user should have access to all linktableids where the user has any of the 4 roles (ActivityAdminId, ActivityBrokerId, ResponsibleAdminId, ResponsibleBrokerId)&lt;/LI&gt;&lt;LI&gt;I need to be able to filter specific reports / pages based on "Mentorsrad" so that a user can only access the data where AccessTestTable[Mentorsrad] = the chosen value&lt;/LI&gt;&lt;LI&gt;I also want to be able to filter so that the user can choose "Now I only want to see rows which I have access to based on role ActivityAdminId"&amp;nbsp;(Any of ActivityAdminId, ActivityBrokerId, ResponsibleAdminId, ResponsibleBrokerId)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Todays solution (in case someone can figure something smart out from this)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;RLS on DimAccess.&lt;/P&gt;&lt;P&gt;AccessToLinkTable contains all LinkTableIds each BrokerId should have access to. But this table is like 25m rows, so everything gets super slow.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;&lt;P&gt;If you need any more details of my model, just ask and I'll try to answer!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 05:36:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RLS-modelling-with-several-roles-and-filters-to-access-Facts/m-p/2503517#M69272</guid>
      <dc:creator>Puttsson</dc:creator>
      <dc:date>2022-05-10T05:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: RLS-modelling with several roles and filters to access Facts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RLS-modelling-with-several-roles-and-filters-to-access-Facts/m-p/2507340#M69452</link>
      <description>&lt;P&gt;Anyone with some advice/expertise here?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 09:53:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RLS-modelling-with-several-roles-and-filters-to-access-Facts/m-p/2507340#M69452</guid>
      <dc:creator>Puttsson</dc:creator>
      <dc:date>2022-05-11T09:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: RLS-modelling with several roles and filters to access Facts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RLS-modelling-with-several-roles-and-filters-to-access-Facts/m-p/2511892#M69695</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="387797" data-lia-user-login="Puttsson" class="lia-mention lia-mention-user"&gt;Puttsson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Maybe you can create relationships by using measures. Try to use&amp;nbsp;CROSSFILTER.&lt;/P&gt;
&lt;P&gt;CROSSFILTER:&amp;nbsp;&lt;SPAN&gt;Specifies the cross-filtering direction to be used in a calculation for a relationship that exists between two columns.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Please refer to the blog to see if it helps you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://radacad.com/dax-crossfilter-function-in-power-bi-write-the-formula-both-directional-but-keep-the-relationship-single-directional" target="_self"&gt;Specifies the cross-filtering direction to be used in a calculation for a relationship that exists between two columns.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I have misunderstood your meaning, please provide&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;your pbix file without privacy information&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and your desired output.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/td-p/1447523" target="_self"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team _ Polly&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 02:11:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RLS-modelling-with-several-roles-and-filters-to-access-Facts/m-p/2511892#M69695</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-13T02:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: RLS-modelling with several roles and filters to access Facts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RLS-modelling-with-several-roles-and-filters-to-access-Facts/m-p/2513444#M69783</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure how Cross-filtering would help here. Maybe my description is not detailed enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I potentially need 4 different people to have access to the same information at the same time.&lt;BR /&gt;The Cross-filtering would be on a measure for a specific fact table, and tell the model to use a specific relationship (like RLS), but I want to use all relationships at the same time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Patrik&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 12:28:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RLS-modelling-with-several-roles-and-filters-to-access-Facts/m-p/2513444#M69783</guid>
      <dc:creator>Puttsson</dc:creator>
      <dc:date>2022-05-13T12:28:52Z</dc:date>
    </item>
  </channel>
</rss>

