<?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: Measure to count the number of Opps that contain a certain product in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-count-the-number-of-Opps-that-contain-a-certain/m-p/1599687#M32071</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Create one of the following measure. I filter the Sales Stage, I get one as the result:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count Measure = 

VAR __Table = { "Dragon Fruit", "Lychee", "Passion Fruit" }
VAR __Table2 =
    ADDCOLUMNS (
        FILTER( table8, Table8[Sales Stage] = "06 - Won, Deploy &amp;amp; Expand"),
        "Exists", INT ( Table8[Product Category - Custom Group] IN __Table )
    )
RETURN
    COUNTROWS (
        FILTER (
            GROUPBY (
                __Table2,
                Table8[Opportunity ID],
                "Count", SUMX ( CURRENTGROUP (), [Exists] )
            ),
            [Count] &amp;gt; 1
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;To get the 2 as the result, remove filter on Sales Stage:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count Measure = 

VAR __Table = { "Dragon Fruit", "Lychee", "Passion Fruit" }
VAR __Table2 =
    ADDCOLUMNS (
        // FILTER( table8, Table8[Sales Stage] = "06 - Won, Deploy &amp;amp; Expand"),
        Table8,
        "Exists", INT ( Table8[Product Category - Custom Group] IN __Table )
    )
RETURN
    COUNTROWS (
        FILTER (
            GROUPBY (
                __Table2,
                Table8[Opportunity ID],
                "Count", SUMX ( CURRENTGROUP (), [Exists] )
            ),
            [Count] &amp;gt; 1
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please click &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help other members find it useful&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.excelfort.com" target="_blank"&gt;&lt;FONT color="blue"&gt;Website&lt;/FONT&gt;&lt;/A&gt; &lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jan 2021 13:44:02 GMT</pubDate>
    <dc:creator>Fowmy</dc:creator>
    <dc:date>2021-01-14T13:44:02Z</dc:date>
    <item>
      <title>Measure to count the number of Opps that contain a certain product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-count-the-number-of-Opps-that-contain-a-certain/m-p/1599491#M32057</link>
      <description>&lt;P&gt;This post has now been deleted.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 14:42:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-count-the-number-of-Opps-that-contain-a-certain/m-p/1599491#M32057</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-09T14:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to count the number of Opps that contain a certain product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-count-the-number-of-Opps-that-contain-a-certain/m-p/1599515#M32061</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you share some sample data and the expected result to have a clear understanding of your question?&lt;BR /&gt;You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.&lt;BR /&gt;____________________________________&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;How to paste sample data with your question?&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to get your questions answered quickly?&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;_____________________________________&lt;BR /&gt;Did I answer your question? Mark this post as a solution, this will help others!.&lt;/P&gt;&lt;P&gt;Click on the Thumbs-Up icon if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 12:37:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-count-the-number-of-Opps-that-contain-a-certain/m-p/1599515#M32061</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2021-01-14T12:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to count the number of Opps that contain a certain product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-count-the-number-of-Opps-that-contain-a-certain/m-p/1599555#M32063</link>
      <description>&lt;P&gt;This post has now been deleted.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 14:43:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-count-the-number-of-Opps-that-contain-a-certain/m-p/1599555#M32063</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-09T14:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to count the number of Opps that contain a certain product</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-count-the-number-of-Opps-that-contain-a-certain/m-p/1599687#M32071</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Create one of the following measure. I filter the Sales Stage, I get one as the result:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count Measure = 

VAR __Table = { "Dragon Fruit", "Lychee", "Passion Fruit" }
VAR __Table2 =
    ADDCOLUMNS (
        FILTER( table8, Table8[Sales Stage] = "06 - Won, Deploy &amp;amp; Expand"),
        "Exists", INT ( Table8[Product Category - Custom Group] IN __Table )
    )
RETURN
    COUNTROWS (
        FILTER (
            GROUPBY (
                __Table2,
                Table8[Opportunity ID],
                "Count", SUMX ( CURRENTGROUP (), [Exists] )
            ),
            [Count] &amp;gt; 1
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;To get the 2 as the result, remove filter on Sales Stage:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count Measure = 

VAR __Table = { "Dragon Fruit", "Lychee", "Passion Fruit" }
VAR __Table2 =
    ADDCOLUMNS (
        // FILTER( table8, Table8[Sales Stage] = "06 - Won, Deploy &amp;amp; Expand"),
        Table8,
        "Exists", INT ( Table8[Product Category - Custom Group] IN __Table )
    )
RETURN
    COUNTROWS (
        FILTER (
            GROUPBY (
                __Table2,
                Table8[Opportunity ID],
                "Count", SUMX ( CURRENTGROUP (), [Exists] )
            ),
            [Count] &amp;gt; 1
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please click &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help other members find it useful&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.excelfort.com" target="_blank"&gt;&lt;FONT color="blue"&gt;Website&lt;/FONT&gt;&lt;/A&gt; &lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 13:44:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-count-the-number-of-Opps-that-contain-a-certain/m-p/1599687#M32071</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2021-01-14T13:44:02Z</dc:date>
    </item>
  </channel>
</rss>

