<?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 Distinct Name where a sum condition is met in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Distinct-Name-where-a-sum-condition-is-met/m-p/1678184#M34384</link>
    <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;COUNTROWS (
    FILTER (
        DISTINCT ( 'Project Hours'[Project Name] ),
        CALCULATE ( SUM ( 'Project Hours'[Actual Hrs.] ) &amp;gt; 0 )
            &amp;amp;&amp;amp; CALCULATE ( SUM ( 'Project Hours'[Planned Hrs.] ) &amp;lt; .01 )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Feb 2021 21:10:00 GMT</pubDate>
    <dc:creator>AlB</dc:creator>
    <dc:date>2021-02-19T21:10:00Z</dc:date>
    <item>
      <title>Count Distinct Name where a sum condition is met</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Distinct-Name-where-a-sum-condition-is-met/m-p/1678151#M34383</link>
      <description>&lt;P&gt;Hello I have yet to find a distinct count of "Project Name" where the sum of the&amp;nbsp;"Actual Hrs." and "Planned Hrs" are &amp;gt; 0.&lt;/P&gt;&lt;P&gt;It has to be distinct count and sum because some projects have instances where there is 0 Actual Hrs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to make this work:&lt;/P&gt;&lt;P&gt;&amp;nbsp; CALCULATE(DISTINCTCOUNT('Project Hours'[Project Name]),Sum('Project Hours'[Actual Hrs.])&amp;gt;0,Sum('Project Hours'[Planned Hrs.])&amp;lt;.01)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;,but Dax does not allow sum within calculate function (I also tried SUMX and it also is not allowed)&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 20:30:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Distinct-Name-where-a-sum-condition-is-met/m-p/1678151#M34383</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-19T20:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Name where a sum condition is met</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Distinct-Name-where-a-sum-condition-is-met/m-p/1678184#M34384</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;COUNTROWS (
    FILTER (
        DISTINCT ( 'Project Hours'[Project Name] ),
        CALCULATE ( SUM ( 'Project Hours'[Actual Hrs.] ) &amp;gt; 0 )
            &amp;amp;&amp;amp; CALCULATE ( SUM ( 'Project Hours'[Planned Hrs.] ) &amp;lt; .01 )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 21:10:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Distinct-Name-where-a-sum-condition-is-met/m-p/1678184#M34384</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2021-02-19T21:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Name where a sum condition is met</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Distinct-Name-where-a-sum-condition-is-met/m-p/1678195#M34386</link>
      <description>&lt;P&gt;You're amazing!!!! Thank you so much!!!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok, now I understand. You have to do calculate for sum and condition and then in outter layer do a filter for the calculate (filter on distinct count of "Name"). Also each sum condition has to be in its own calculate function&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 21:25:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Distinct-Name-where-a-sum-condition-is-met/m-p/1678195#M34386</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-19T21:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Name where a sum condition is met</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Distinct-Name-where-a-sum-condition-is-met/m-p/1678226#M34387</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keeping the approach you were trying, you could do stg like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE (
    DISTINCTCOUNT ( 'Project Hours'[Project Name] ),
    FILTER (
        DISTINCT ( 'Project Hours'[Project Name] ),
        CALCULATE ( SUM ( 'Project Hours'[Actual Hrs.] ) &amp;gt; 0 )
            &amp;amp;&amp;amp; CALCULATE ( SUM ( 'Project Hours'[Planned Hrs.] ) &amp;lt; .01 )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but it'd be a bit redundant&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 22:02:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Distinct-Name-where-a-sum-condition-is-met/m-p/1678226#M34387</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2021-02-19T22:02:06Z</dc:date>
    </item>
  </channel>
</rss>

