<?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: CountRows where column A contains a string and column B = a string. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1172559#M18135</link>
    <description>&lt;P&gt;Add a FILTER. And use &amp;amp;&amp;amp;&lt;/P&gt;</description>
    <pubDate>Sun, 21 Jun 2020 19:27:51 GMT</pubDate>
    <dc:creator>stevedep</dc:creator>
    <dc:date>2020-06-21T19:27:51Z</dc:date>
    <item>
      <title>CountRows where column A contains a string and column B = a string.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1169596#M18001</link>
      <description>&lt;P&gt;I have been driving myself crazy with this, and I've looked around and asked colleagues and I can't seem to get there. I am used to Power Apps syntax, but not DAX so I really need some help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with many columns, two of which are important for a measure I am trying to create:&lt;BR /&gt;&lt;BR /&gt;Table = Project Overview&lt;/P&gt;&lt;P&gt;Column 1 = Project Name&lt;/P&gt;&lt;P&gt;Column 2 = CP&lt;BR /&gt;&lt;BR /&gt;I need to get the number of rows where: Project Name contains "Mission" AND CP = "Missing CP"&lt;BR /&gt;&lt;BR /&gt;I got this far:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;calculate( COUNT( 'Project Overview'[Project Name] ), CONTAINSSTRING('Project Overview'[Project Name],"Mission"))&lt;BR /&gt;But I can't figure out how to add a second condition in my filter. Can anyone help?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Jun 2020 18:01:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1169596#M18001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-18T18:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: CountRows where column A contains a string and column B = a string.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1169637#M18003</link>
      <description>&lt;P&gt;Perhaps with AND(CONTAINSSTRING () ; CONTAINSSTRING ())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the brackets you add your logic.&lt;/P&gt;&lt;P&gt;Kind regards Steve&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 18:13:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1169637#M18003</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-18T18:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: CountRows where column A contains a string and column B = a string.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1169999#M18015</link>
      <description>&lt;P&gt;You can try an expression like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;New Measure =
COUNTROWS (
    FILTER (
        FILTER (
            'Project Overview',
            SEARCH ( 'Project Overview'[Project Name], "Mission",, 0 ) &amp;gt; 0
        ),
        'Project Name'[CP] = "Missing CP"
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The FILTERs are nested to improve performance if many rows (one column at a time).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works for you, please mark it as the solution.&amp;nbsp; Kudos are appreciated too.&amp;nbsp; Please let me know if not.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 22:37:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1169999#M18015</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-06-18T22:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: CountRows where column A contains a string and column B = a string.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1170687#M18031</link>
      <description>&lt;P&gt;Thanks for this, unfortunately it gives me the error "the expression contains multiple columns but only a single column can be used in a True/False expression that is used as a table filter expression"&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 06:44:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1170687#M18031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-19T06:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: CountRows where column A contains a string and column B = a string.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1170694#M18032</link>
      <description>&lt;P&gt;Thanks Pat, for some reason it is showing 0 results, which is not true. My data definitely has rows where Project Name contains Mission and CO = "Missing CP"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 06:47:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1170694#M18032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-19T06:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: CountRows where column A contains a string and column B = a string.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1170761#M18034</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Try this measure&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CP and Mission = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var a = CONTAINSSTRING(MAX('Table'[Project Name]), "Mission")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var b = FILTER('Table', a &amp;amp;&amp;amp; MAX('Table'[CP]) = "CP")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNTROWS(b)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Harsh Nathani&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 19 Jun 2020 07:27:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1170761#M18034</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-19T07:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: CountRows where column A contains a string and column B = a string.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1172559#M18135</link>
      <description>&lt;P&gt;Add a FILTER. And use &amp;amp;&amp;amp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jun 2020 19:27:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/1172559#M18135</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-21T19:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: CountRows where column A contains a string and column B = a string.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/3537663#M135936</link>
      <description>&lt;P&gt;Dear Mahoneypat,&lt;/P&gt;&lt;P&gt;thank you for your solution. I've tried to apply &amp;nbsp;COUNTROWS /FILTER combination in my calculation, but it didn't work for me.. could you advise maybe, what do I do wrong?&lt;/P&gt;&lt;P&gt;thank you in advance for your help!&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Piechart-diagram-based-on-statistics-percentage-calculation/m-p/3537654#M135935" target="_blank"&gt;https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Piechart-diagram-based-on-statistics-percentage-calculation/m-p/3537654#M135935&lt;/A&gt;&lt;BR /&gt;best regards,&lt;/P&gt;&lt;P&gt;Katia&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 18:09:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountRows-where-column-A-contains-a-string-and-column-B-a-string/m-p/3537663#M135936</guid>
      <dc:creator>Katja262373</dc:creator>
      <dc:date>2023-11-16T18:09:59Z</dc:date>
    </item>
  </channel>
</rss>

