<?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: Exclude certain string values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-string-values/m-p/2877464#M93002</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Try like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CALCULATE([No of Emails], Filter( dim_wrapup , not( dim_wrapup[Wrap Up Group] in {"BO Action", "BO Support", "H&amp;amp;M CLUB" })) , filter( dim_brand, SEARCH("*Ar*",dim_brand[Brand],1,0) = 0 ) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check this too&lt;/P&gt;
&lt;P&gt;&lt;A href="http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/" target="_blank"&gt;http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Nov 2022 13:57:14 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-11-01T13:57:14Z</dc:date>
    <item>
      <title>Exclude certain string values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-string-values/m-p/2876926#M92978</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;I am a Qlikview developer that has been working a lot with PBI lately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a case were I want to calculate "Number of Answered Emails" and exclude all rows where column Workgroup includes GDPR string.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As an example the workgroups can be &lt;STRONG&gt;Arket_Austrian_GDPR_Emails&lt;/STRONG&gt; and we have a lot of these kind of values that contains GDPR.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any best practice for these kind of calculations? I have a lot of calculations that needs the same treatment in terms of excluding multiple string values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried creating a metric for this, see below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Contact per Order % = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR IFGDPR&lt;/STRONG&gt;&lt;EM&gt; = IF(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SEARCH("*Ar*",MAX(dim_brand[Brand]),1,BLANK())&amp;gt;=1&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,1&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,0 )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR NoEmails&lt;/STRONG&gt; &lt;EM&gt;= CALCULATE([No of Emails], dim_wrapup[Wrap Up Group] &amp;lt;&amp;gt; "BO Action", dim_wrapup[Wrap Up Group] &amp;lt;&amp;gt; "BO Support", dim_wrapup[Wrap Up Group] &amp;lt;&amp;gt; "H&amp;amp;M CLUB", IFGDPR = 0 )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RETURN&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;NoEmails&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI, No of Emails are already aggregated in a SUM function in a measure before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR Fredrik&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 10:15:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-string-values/m-p/2876926#M92978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-01T10:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude certain string values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-string-values/m-p/2877464#M93002</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Try like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CALCULATE([No of Emails], Filter( dim_wrapup , not( dim_wrapup[Wrap Up Group] in {"BO Action", "BO Support", "H&amp;amp;M CLUB" })) , filter( dim_brand, SEARCH("*Ar*",dim_brand[Brand],1,0) = 0 ) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check this too&lt;/P&gt;
&lt;P&gt;&lt;A href="http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/" target="_blank"&gt;http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 13:57:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-string-values/m-p/2877464#M93002</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-11-01T13:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude certain string values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-string-values/m-p/2877623#M93013</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply!&amp;nbsp;&lt;BR /&gt;Your solution was exactly what I was looking for. This actually made me understand so much more about DAX and how to think...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DAX vs Qlik is very different in terms of logic in some cases and this helped me. I had a lot of cases were I needed to do filtering of this kind in some key metrics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have nice day!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR Fredrik&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 15:02:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-string-values/m-p/2877623#M93013</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-01T15:02:57Z</dc:date>
    </item>
  </channel>
</rss>

