Forum Discussion

EduSurveys's avatar
EduSurveys
Icon for Advocate II rankAdvocate II
7 years ago
Solved

DAX measure: Counting where index max value changes for each user

Hi, I am looking for a DAX measure that calculates current membership in a co-curricular organization based on max OrgIndex for each student. The problem is that I have one row for every org that the...
  • Nathaniel_C's avatar
    Nathaniel_C
    7 years ago

    Hi EduSurveys ,

    Here we go. Courtesy of ImkeF  She is amazing!

    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
    Nathaniel

    PBIX Here 

    f

    Counter = 
    COUNTROWS (
        FILTER (
            SELECTCOLUMNS ( Surv, "ID", Surv[STUDENT_ID], "Org_Index", Surv[OrgIndex] ),
            VAR MAXOrgIndex =
                CALCULATE ( MAX ( Surv[OrgIndex] ), ALLEXCEPT ( Surv, Surv[STUDENT_ID] ) )
            RETURN
                [Org_Index] = MAXOrgIndex
        )
    )