Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Find Latest duplicate

Hi All,   I have a Scorm learning dataset that has many duplicate records. This happens if a user starts a course and does not finish but comes back and finishes at a later date. The system creates...
  • ERD's avatar
    3 years ago

    Hi, Anonymous , one of the options for your measure:

    status =
    VAR course = MAX ( Table1[Course] )
    VAR employee = MAX ( Table1[Employee] )
    VAR dt =
        CALCULATE (
            MAX ( Table1[Date] ),
            Table1[Employee] = employee,
            Table1[Course] = course,
            ALL ( Table1[Date] )
        )
    VAR res =
        IF (
            MAX ( Table1[Date] ) = dt,
            CALCULATE (
                MAX ( Table1[Completed] ),
                Table1[Employee] = employee,
                Table1[Course] = course
            )
        )
    RETURN
        res