<?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: DAX for RLS? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-RLS/m-p/2201064#M51670</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;RLS set for one shared dataset will take effect for all the related reports.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Different reports based on the same dataset have the same access control for row-level security.&lt;/P&gt;
&lt;P&gt;Copy-pasting multiple datasets for different permissions is a workaround, it's not an elegant solution, but it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Zeon Zheng&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 09:17:48 GMT</pubDate>
    <dc:creator>v-angzheng-msft</dc:creator>
    <dc:date>2021-11-22T09:17:48Z</dc:date>
    <item>
      <title>DAX for RLS?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-RLS/m-p/2192300#M51274</link>
      <description>&lt;P&gt;Is there a way in DAX to achieve the below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a model with tables:&lt;/P&gt;&lt;P&gt;-Revenue.&lt;/P&gt;&lt;P&gt;-CostCenter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have RLS set up for two special users, that I take their &lt;STRONG&gt;USERNAME()&lt;/STRONG&gt;, and I give these two users access to a specific sets of &lt;STRONG&gt;CostCenters&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I am creating a new PowerBI,&amp;nbsp; and I am trying to reutilize the same cube.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, the access is based on another table named ‘&lt;STRONG&gt;Contract&lt;/STRONG&gt;’, so these same two users shall have access to a set of contracts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I have a way of using 2 Power BIs, pointing to the same cube, and in one report they shall see CostCenters x,y,z and in the other Contractoz a, b, c?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or is it more convenient to just “copy paste” the entire cube (use 2 cubes) and do the RLS on each one. (I also ask this in terms of future mainteanance).&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 11:26:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-RLS/m-p/2192300#M51274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-16T11:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for RLS?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-RLS/m-p/2201064#M51670</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;RLS set for one shared dataset will take effect for all the related reports.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Different reports based on the same dataset have the same access control for row-level security.&lt;/P&gt;
&lt;P&gt;Copy-pasting multiple datasets for different permissions is a workaround, it's not an elegant solution, but it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Zeon Zheng&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 09:17:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-RLS/m-p/2201064#M51670</guid>
      <dc:creator>v-angzheng-msft</dc:creator>
      <dc:date>2021-11-22T09:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for RLS?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-RLS/m-p/4848224#M185011</link>
      <description>&lt;P&gt;Option A - One dataset, dynamic RLS with OR logic&lt;BR /&gt;If both user groups can see data from either CostCenter or Contract, build dynamic RLS using security tables.&lt;BR /&gt;Example setup:&lt;BR /&gt;Security_CostCenter with columns [UPN, CostCenterKey]&lt;BR /&gt;Security_Contract with columns [UPN, ContractKey]&lt;BR /&gt;Create one RLS role that allows access if either condition is true:&lt;/P&gt;
&lt;P&gt;VAR u = USERPRINCIPALNAME()&lt;BR /&gt;VAR AllowedCC = CALCULATETABLE(VALUES(Security_CostCenter[CostCenterKey]), Security_CostCenter[UPN] = u)&lt;BR /&gt;VAR AllowedContract = CALCULATETABLE(VALUES(Security_Contract[ContractKey]), Security_Contract[UPN] = u)&lt;BR /&gt;RETURN&lt;BR /&gt;CONTAINS(AllowedCC, Security_CostCenter[CostCenterKey], Revenue[CostCenterKey])&lt;BR /&gt;||&lt;BR /&gt;CONTAINS(AllowedContract, Security_Contract[ContractKey], Revenue[ContractKey])&lt;/P&gt;
&lt;P&gt;This lets both reports work from the same model, while access is decided dynamically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Option B - Two datasets with separate RLS&lt;BR /&gt;If the same users must see different data in different reports, create two datasets.&lt;BR /&gt;Dataset A uses RLS by CostCenter.&lt;BR /&gt;Dataset B uses RLS by Contract.&lt;BR /&gt;Each report connects to its own dataset. This is cleaner to maintain when access rules differ completely.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Option C - Embedded reports with selected roles&lt;BR /&gt;If your reports are embedded in an app, you can specify the RLS role at runtime. For example, Report 1 runs under “CostCenterRole” and Report 2 under “ContractRole”. This method works only in embedded solutions, not in regular Power BI Service.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Oct 2025 12:25:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-RLS/m-p/4848224#M185011</guid>
      <dc:creator>technolog</dc:creator>
      <dc:date>2025-10-12T12:25:22Z</dc:date>
    </item>
  </channel>
</rss>

