Forum Discussion

syasmin25's avatar
syasmin25
Icon for Helper V rankHelper V
6 years ago
Solved

Counting ELA and MATH

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...
  • AlB's avatar
    AlB
    6 years ago

    syasmin25 

    or this version might be faster

    Measure V2 =
    VAR tab0_ =
        FILTER ( Table1, Table1[Subject] IN { "MATH", "ELA" } )
    RETURN
        SUMX (
            tab0_,
            ( COUNTROWS ( FILTER ( tab0_, [ID] = EARLIER ( [ID] ) ) ) = 2 ) * ( 1 / 2 )
        )

     

    Please mark the question solved when done and consider giving kudos if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers