<?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: COUNT in a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718117#M82778</link>
    <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;CALCULATE(&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;DISTINCTCOUNT( OrderNumber ),&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Type = "A"&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;Let me know if that helps!&lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2022 19:10:07 GMT</pubDate>
    <dc:creator>PabloDeheza</dc:creator>
    <dc:date>2022-08-22T19:10:07Z</dc:date>
    <item>
      <title>COUNT in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718072#M82776</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a sample table like the one I am working with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Order Number&amp;nbsp; &amp;nbsp;-&amp;nbsp; &amp;nbsp;Type&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some order numbers repeat, but I would like to only count each order number once, AND count only instances with Type "A". The result I am looking for using the example table above is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Order Number&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; &amp;nbsp;Count&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot add a column, so I have to use measures.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 18:44:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718072#M82776</guid>
      <dc:creator>nhmpp</dc:creator>
      <dc:date>2022-08-22T18:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718117#M82778</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;CALCULATE(&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;DISTINCTCOUNT( OrderNumber ),&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Type = "A"&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;Let me know if that helps!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 19:10:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718117#M82778</guid>
      <dc:creator>PabloDeheza</dc:creator>
      <dc:date>2022-08-22T19:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718135#M82782</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the error message below, as I cannot view it in any visual.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 19:22:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718135#M82782</guid>
      <dc:creator>nhmpp</dc:creator>
      <dc:date>2022-08-22T19:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718144#M82784</link>
      <description>&lt;P&gt;Can you share how you wrote the DAX code?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 19:26:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718144#M82784</guid>
      <dc:creator>PabloDeheza</dc:creator>
      <dc:date>2022-08-22T19:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718149#M82787</link>
      <description>&lt;P&gt;Sure, it is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TransCount = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[order_number_id]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[TranYN]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Yes"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Yes" and "No" are the two groups, rather than A and B&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 22 Aug 2022 19:29:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718149#M82787</guid>
      <dc:creator>nhmpp</dc:creator>
      <dc:date>2022-08-22T19:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718162#M82789</link>
      <description>&lt;P&gt;Is TranYN a measure?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 19:37:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718162#M82789</guid>
      <dc:creator>PabloDeheza</dc:creator>
      <dc:date>2022-08-22T19:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718170#M82790</link>
      <description>&lt;P&gt;Hi, Yes it is. Will this not work becaue of that?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 19:43:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718170#M82790</guid>
      <dc:creator>nhmpp</dc:creator>
      <dc:date>2022-08-22T19:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718173#M82791</link>
      <description>&lt;P&gt;I made that measure because there were many different values that count as a "Yes" (as well as many that count as a "no"), and I am not sure how to incorporate them all to be counted.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 19:44:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718173#M82791</guid>
      <dc:creator>nhmpp</dc:creator>
      <dc:date>2022-08-22T19:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718190#M82793</link>
      <description>&lt;P&gt;You should not use a measure there, you should use the column in your table. If you have a column where you are taking the "Yes" value, use that.&lt;/P&gt;
&lt;P&gt;Not sure exactly what you mean with "many different values that count as a "Yes" "&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 19:52:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718190#M82793</guid>
      <dc:creator>PabloDeheza</dc:creator>
      <dc:date>2022-08-22T19:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718211#M82798</link>
      <description>&lt;P&gt;I figured it out, thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 20:11:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-in-a-measure/m-p/2718211#M82798</guid>
      <dc:creator>nhmpp</dc:creator>
      <dc:date>2022-08-22T20:11:04Z</dc:date>
    </item>
  </channel>
</rss>

