<?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: Multiple True / False filter expression in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Multiple-True-False-filter-expression/m-p/1778822#M28897</link>
    <description>&lt;P&gt;Please provide sample data in usable format (not as a picture).&lt;/P&gt;</description>
    <pubDate>Mon, 12 Apr 2021 01:11:10 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2021-04-12T01:11:10Z</dc:date>
    <item>
      <title>Multiple True / False filter expression</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Multiple-True-False-filter-expression/m-p/1775490#M28858</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I am trying to create a measure that sums the cost values, filtering by string type columns that contain certain parameters, however, although the measure theoretically has no errors, it is giving me wrong results, because&amp;nbsp;it doesnt apply any of the filters.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I tried to do it in three different ways as shown below, but none of them work properly.&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Next I show you what I did so that please help me&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;COST =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM(FACTS[Cost]),&lt;BR /&gt;CONTAINSSTRING(LOWER(FACTS[Campaign name]),"ff") = TRUE ||&lt;BR /&gt;CONTAINSSTRING(LOWER(FACTS[Creative]),"ff")=TRUE ||&lt;BR /&gt;CONTAINSSTRING(LOWER(FACTS[CONTENIDO]),"ff")=TRUE||&lt;BR /&gt;CONTAINSSTRING(LOWER(FACTS[Campaign name]),"pub")=TRUE &amp;amp;&amp;amp;&lt;BR /&gt;CONTAINSSTRING(LOWER(FACTS[Funnel Stage]),"do")=TRUE&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;in this case I have the following error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The expression contains multiple columns, but in a True / False expression that is used as a table filter expression, only one column can be used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so I included the filter statement:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;COST2 =&lt;BR /&gt;SUMX(&lt;BR /&gt;FILTER(&lt;BR /&gt;FACTS,&lt;BR /&gt;(CONTAINSSTRING(LOWER(FACTS[Campaign name]),"ff")=TRUE) ||&lt;BR /&gt;(CONTAINSSTRING(LOWER(FACTS[Creative]),"ff")=TRUE) ||&lt;BR /&gt;(CONTAINSSTRING(LOWER(FACTS[CONTENIDO]),"ff")=TRUE) ||&lt;BR /&gt;(CONTAINSSTRING(LOWER(FACTS[Gerencia]),"pub")=TRUE) &amp;amp;&amp;amp;&lt;BR /&gt;(CONTAINSSTRING(LOWER(FACTS[Funnel Stage]),"do")=TRUE)&lt;BR /&gt;),&lt;BR /&gt;FACTS[Cost]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but it doesn't work properly either &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;COST3 =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM(FACTS[Cost]),&lt;BR /&gt;FILTER(&lt;BR /&gt;FACTS,&lt;BR /&gt;CONTAINSSTRING(LOWER(FACTS[Campaign name]),"ff") = TRUE ||&lt;BR /&gt;CONTAINSSTRING(LOWER(FACTS[Creative]),"ff")=TRUE ||&lt;BR /&gt;CONTAINSSTRING(LOWER(FACTS[CONTENIDO]),"ff")=TRUE||&lt;BR /&gt;CONTAINSSTRING(LOWER(FACTS[Campaign name]),"pub")=TRUE &amp;amp;&amp;amp;&lt;BR /&gt;CONTAINSSTRING(LOWER(FACTS[Funnel Stage]),"do")=TRUE&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Any ideas that can help me?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Apr 2021 23:25:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Multiple-True-False-filter-expression/m-p/1775490#M28858</guid>
      <dc:creator>diaz_edinson</dc:creator>
      <dc:date>2021-04-08T23:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple True / False filter expression</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Multiple-True-False-filter-expression/m-p/1778822#M28897</link>
      <description>&lt;P&gt;Please provide sample data in usable format (not as a picture).&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 01:11:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Multiple-True-False-filter-expression/m-p/1778822#M28897</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-04-12T01:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple True / False filter expression</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Multiple-True-False-filter-expression/m-p/1783473#M28972</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="289348" data-lia-user-login="diaz_edinson" class="lia-mention lia-mention-user"&gt;diaz_edinson&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;I'm not so sure why you keeping used CONTAINSSTRING functions. In fact, you can write a filter function to append with these conditions. Please try to use the following measure formula if it helps:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;COST =
CALCULATE (
    SUM ( FACTS[Cost] ),
    FILTER (
        ALLSELECTED ( FACTS ),
        LOWER ( FACTS[Campaign name] ) = "ff"
            || LOWER ( FACTS[Creative] ) = "ff"
            || LOWER ( FACTS[CONTENIDO] ) = "ff"
            || AND (
                LOWER ( FACTS[Campaign name] ) = "pub",
                LOWER ( FACTS[Funnel Stage] ) = "do"
            )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;If above not works, can please share some dummy data with a similar data structure and expected results? It should help us clarify your scenario and test to coding formula.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&amp;nbsp;&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>Wed, 14 Apr 2021 02:49:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Multiple-True-False-filter-expression/m-p/1783473#M28972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-14T02:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple True / False filter expression</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Multiple-True-False-filter-expression/m-p/1789379#M29039</link>
      <description>&lt;P&gt;&lt;SPAN class="VIiyi"&gt;the reason I used CONTAINSSTRING is that the text contains the arguments "ff" or "do". but I solved it using this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Cost = 
VAR NESFF =
    CALCULATE(
        SUM(FACTS[Cost]),
        FILTER(
            FACTS,
            IF(
                CONTAINSSTRING(LOWER(FACTS[Campaign name]),"ff") ||
                CONTAINSSTRING(LOWER(FACTS[Creative]),"ff")  || 
                CONTAINSSTRING(LOWER(FACTS[Ad content]),"ff") ||
                CONTAINSSTRING(LOWER(FACTS[Ad content]),"PUB"), 1, 0
            )=0
        )
    )
RETURN
NESFF&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 13:12:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Multiple-True-False-filter-expression/m-p/1789379#M29039</guid>
      <dc:creator>diaz_edinson</dc:creator>
      <dc:date>2021-04-16T13:12:17Z</dc:date>
    </item>
  </channel>
</rss>

