<?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: Counting ELA and MATH in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1130737#M16777</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="199377" data-lia-user-login="syasmin25" class="lia-mention lia-mention-user"&gt;syasmin25&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or this version might be faster&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure V2 =
VAR tab0_ =
    FILTER ( Table1, Table1[Subject] IN { "MATH", "ELA" } )
RETURN
    SUMX (
        tab0_,
        ( COUNTROWS ( FILTER ( tab0_, [ID] = EARLIER ( [ID] ) ) ) = 2 ) * ( 1 / 2 )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 30 May 2020 12:32:38 GMT</pubDate>
    <dc:creator>AlB</dc:creator>
    <dc:date>2020-05-30T12:32:38Z</dc:date>
    <item>
      <title>Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1130270#M16755</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have an issue and am having trouble wrapping my head around it. I am trying to count students absent in English and Math classes. The issue here is the database places students absent per period on a row to row basis. I have created a sample here. The original one is over a million rows.&lt;img /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I was wondering if there is any way I can create a column that counts number of students absent in MATH and ELA. I know I can do table. But I need to be looking more like the picture below (red font is where I want the calculation) and was wondering if someone could help.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 22:15:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1130270#M16755</guid>
      <dc:creator>syasmin25</dc:creator>
      <dc:date>2020-05-29T22:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1130492#M16769</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NumberOfStudentsAbsentInELAAndMath = 
var filterset = FILTER(PresenceStudents;PresenceStudents[Subject]="ELA" || PresenceStudents[Subject]="MATH")
var summaryset_ineiterclass = SUMMARIZE(filterset;PresenceStudents[ID])
var allstudents = SUMMARIZE(PresenceStudents;PresenceStudents[ID])
return
COUNTX(EXCEPT(allstudents;summaryset_ineiterclass);1)&lt;/LI-CODE&gt;&lt;P&gt;As can be seen here:&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power BI file is available &lt;A href="https://1drv.ms/u/s!AvU6hhKLfmEcgddWRXVNeQ45HH9Sqg?e=etV8P2" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please accept as solution if this is what you are looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 07:07:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1130492#M16769</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-05-30T07:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1130736#M16776</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="199377" data-lia-user-login="syasmin25" class="lia-mention lia-mention-user"&gt;syasmin25&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; Place Table1[School ID] in a table visual&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; Place this measure in the visual&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure V1 =
COUNTROWS (
    FILTER (
        DISTINCT ( Table1[ID] ),
        CALCULATE ( COUNT ( Table1[ID] ), Table1[Subject] IN { "ELA", "MATH" } ) = 2
    )
) + 0
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 12:30:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1130736#M16776</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-05-30T12:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1130737#M16777</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="199377" data-lia-user-login="syasmin25" class="lia-mention lia-mention-user"&gt;syasmin25&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or this version might be faster&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure V2 =
VAR tab0_ =
    FILTER ( Table1, Table1[Subject] IN { "MATH", "ELA" } )
RETURN
    SUMX (
        tab0_,
        ( COUNTROWS ( FILTER ( tab0_, [ID] = EARLIER ( [ID] ) ) ) = 2 ) * ( 1 / 2 )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 12:32:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1130737#M16777</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-05-30T12:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1131167#M16799</link>
      <description>&lt;P&gt;Not sure what happened but this same post was also listed under "Counting Core Courses".&amp;nbsp; I had replied with this expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Absent ELA and Math =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;COUNTROWS (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FILTER (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VALUES ( Absences[ID] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE ( COUNTROWS ( Absences ), Absences[Subject] IN { "ELA", "Math" } ) = 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works for you, please mark it as 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>Sat, 30 May 2020 23:53:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1131167#M16799</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-05-30T23:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1133680#M16871</link>
      <description>&lt;P&gt;I would need a distinct count on the IDs.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 16:02:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1133680#M16871</guid>
      <dc:creator>syasmin25</dc:creator>
      <dc:date>2020-06-01T16:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1133708#M16872</link>
      <description>&lt;P&gt;It is not doing a distinct count on the ID, is there a way that would be possible? I tried to go along in a few ways but it doesnt seem to work.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 16:15:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1133708#M16872</guid>
      <dc:creator>syasmin25</dc:creator>
      <dc:date>2020-06-01T16:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1133783#M16877</link>
      <description>&lt;P&gt;In my response I share a power bi file with a working solution?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 16:46:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1133783#M16877</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-01T16:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1133817#M16878</link>
      <description>&lt;P&gt;Yes, I am a bit confused since I will also be providing a drillthrough. When I did that to the file that you have provided, it shows other subjects too when I copy in the formula and do a drill through with the IDs and periods and subjects.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 17:06:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1133817#M16878</guid>
      <dc:creator>syasmin25</dc:creator>
      <dc:date>2020-06-01T17:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1133864#M16881</link>
      <description>&lt;P&gt;Perhaps I can help if you can share that file? Perhaps via a PM?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 17:35:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1133864#M16881</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-01T17:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1134589#M16901</link>
      <description>&lt;P&gt;I have tried your equationn, however it almost there yet not there with the result. Like my result for one of the schools is supposed to be 52 but witht he equation, it is still showing 60. I am guessing that it is carrying in duplicate values.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 02:48:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1134589#M16901</guid>
      <dc:creator>syasmin25</dc:creator>
      <dc:date>2020-06-02T02:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1134590#M16902</link>
      <description>&lt;P&gt;The equation still carries some duplicates.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 02:50:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1134590#M16902</guid>
      <dc:creator>syasmin25</dc:creator>
      <dc:date>2020-06-02T02:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Counting ELA and MATH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1134795#M16904</link>
      <description>&lt;P&gt;Sorry, I can't help further unless you provide more information. Perhaps I can when you share a Pbi file with an anonymous subset of your data that shows the problem?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 05:30:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-ELA-and-MATH/m-p/1134795#M16904</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-02T05:30:48Z</dc:date>
    </item>
  </channel>
</rss>

