<?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 Model performance issues due to complex RLS DAX code? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Model-performance-issues-due-to-complex-RLS-DAX-code/m-p/3237032#M119014</link>
    <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about RLS in our Azure Analysis Services at the model level, and whether the complexity of the RLS code can affect the performance of a PBI report connected with live connection. Namely, we are having performance issues for this particular report with this RLS solution, so I'm trying to dig into what the cause could be.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have put RLS on a table because we want external guest users in our Azure Active Directory to be able to see a sales report, based on a specific vendor ID.&lt;BR /&gt;&lt;BR /&gt;A separate table contains the guest users' email and their provider ID.&lt;BR /&gt;&lt;BR /&gt;The RLS is set to their USERPRINCIPALNAME() with some changes made in DAX as we need to remove the email string which automatically gets some extra characters as they are guest users. See examples below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;USERPRINCALNAME() for guest user with email address "name@domain.com" becomes:&lt;BR /&gt;name_domain.com#EXT#@stadium365.onmicrosoft.com.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DAX code in the RLS condition converts the string above to its original form "name@domain.com".&lt;BR /&gt;&lt;BR /&gt;Long background… So, my question is – do you think it's worth optimizing this solution and get rid of the complex DAX code and maybe get a bit better performance on the sales report these guest users have access to?&lt;BR /&gt;&lt;BR /&gt;If the complexity of the DAX code that sets the RLS condition does not affect the results of reports, is the mere fact that RLS exists making the report slow?&lt;BR /&gt;&lt;BR /&gt;Sorry for such a long question, just let me know if you need more background. Thanks!&lt;/P&gt;&lt;P&gt;/Ella&lt;/P&gt;</description>
    <pubDate>Tue, 16 May 2023 06:22:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-16T06:22:29Z</dc:date>
    <item>
      <title>Model performance issues due to complex RLS DAX code?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Model-performance-issues-due-to-complex-RLS-DAX-code/m-p/3237032#M119014</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about RLS in our Azure Analysis Services at the model level, and whether the complexity of the RLS code can affect the performance of a PBI report connected with live connection. Namely, we are having performance issues for this particular report with this RLS solution, so I'm trying to dig into what the cause could be.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have put RLS on a table because we want external guest users in our Azure Active Directory to be able to see a sales report, based on a specific vendor ID.&lt;BR /&gt;&lt;BR /&gt;A separate table contains the guest users' email and their provider ID.&lt;BR /&gt;&lt;BR /&gt;The RLS is set to their USERPRINCIPALNAME() with some changes made in DAX as we need to remove the email string which automatically gets some extra characters as they are guest users. See examples below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;USERPRINCALNAME() for guest user with email address "name@domain.com" becomes:&lt;BR /&gt;name_domain.com#EXT#@stadium365.onmicrosoft.com.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DAX code in the RLS condition converts the string above to its original form "name@domain.com".&lt;BR /&gt;&lt;BR /&gt;Long background… So, my question is – do you think it's worth optimizing this solution and get rid of the complex DAX code and maybe get a bit better performance on the sales report these guest users have access to?&lt;BR /&gt;&lt;BR /&gt;If the complexity of the DAX code that sets the RLS condition does not affect the results of reports, is the mere fact that RLS exists making the report slow?&lt;BR /&gt;&lt;BR /&gt;Sorry for such a long question, just let me know if you need more background. Thanks!&lt;/P&gt;&lt;P&gt;/Ella&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 06:22:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Model-performance-issues-due-to-complex-RLS-DAX-code/m-p/3237032#M119014</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-16T06:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Model performance issues due to complex RLS DAX code?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Model-performance-issues-due-to-complex-RLS-DAX-code/m-p/3252198#M120025</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;In fact, these type of replace operations will not obviously affect the report performance data loading.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Normally the performance will been effect when you batch use Dax expressions with looping and iterators. Please take a look at the following link about Dax performances:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://maqsoftware.com/insights/dax-best-practices" target="_blank"&gt;DAX Best Practices | MAQ Software Insights&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://www.sqlbi.com/articles/optimizing-nested-iterators-in-dax/" target="_blank"&gt;Optimizing nested iterators in DAX - SQLBI&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 02:56:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Model-performance-issues-due-to-complex-RLS-DAX-code/m-p/3252198#M120025</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-25T02:56:53Z</dc:date>
    </item>
  </channel>
</rss>

