<?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: Optimize DAX query in roles management in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Optimize-DAX-query-in-roles-management/m-p/2126724#M48786</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my optimization, can we do better ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF( OR(&lt;BR /&gt;SEARCH("France - Monaco" , DIMENSION_individual[regions_all_boutique_purchase_individual],,0)=0,&lt;BR /&gt;SEARCH("Fashion" , DIMENSION_individual[distribution_all_networks_boutique_individual],,0)=0&lt;BR /&gt;) , FALSE(), TRUE() )&lt;/P&gt;</description>
    <pubDate>Mon, 11 Oct 2021 09:15:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-10-11T09:15:00Z</dc:date>
    <item>
      <title>Optimize DAX query in roles management</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Optimize-DAX-query-in-roles-management/m-p/2126534#M48783</link>
      <description>&lt;P&gt;Hi, I created a role which is too slow because of its DAX query :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me to optimize it ?&lt;/P&gt;&lt;P&gt;I already read some best practices like :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Use SEARCH() with the last parameter&lt;BR /&gt;The SEARCH() DAX function accepts the last parameter as the value that the query must return if the search string is not found. You should always use the SEARCH() function instead of using Error functions along with SEARCH().&lt;/LI&gt;&lt;LI&gt;Use variables instead of repeating measures inside the IF branch&lt;/LI&gt;&lt;LI&gt;I don't know if two IF statement is a good practice.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;( IF( ISERROR( SEARCH("France - Monaco" , DIMENSION_individual[regions_all_boutique_purchase_individual]) ), FALSE(), TRUE() ) ) &amp;amp;&amp;amp; ( IF( ISERROR( SEARCH("Fashion" , DIMENSION_individual[distribution_all_networks_boutique_individual]) ), FALSE(), TRUE() ) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance !&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 08:09:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Optimize-DAX-query-in-roles-management/m-p/2126534#M48783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-11T08:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize DAX query in roles management</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Optimize-DAX-query-in-roles-management/m-p/2126724#M48786</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my optimization, can we do better ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF( OR(&lt;BR /&gt;SEARCH("France - Monaco" , DIMENSION_individual[regions_all_boutique_purchase_individual],,0)=0,&lt;BR /&gt;SEARCH("Fashion" , DIMENSION_individual[distribution_all_networks_boutique_individual],,0)=0&lt;BR /&gt;) , FALSE(), TRUE() )&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 09:15:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Optimize-DAX-query-in-roles-management/m-p/2126724#M48786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-11T09:15:00Z</dc:date>
    </item>
  </channel>
</rss>

