Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filter on Multiple tables using a Master table

Hello Everyone,    Newbie here trying to create a measure that will use Employee master table (that contains all the employees info without duplicates) to check for each row in the Employee master ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

    You can create a calculated column to get the flag whether the employee take course or not:

    Flag for take courses =
    VAR _curemp = 'Employee master'[Employee ID]
    VAR _compemp =
        CALCULATETABLE (
            VALUES ( 'Completed'[Employee ID] ),
            FILTER ( ALL ( 'Completed' ), 'Completed'[Employee ID] = _curemp )
        )
    VAR _regemp =
        CALCULATETABLE (
            VALUES ( 'Registered'[Employee ID] ),
            FILTER ( ALL ( 'Registered' ), 'Registered'[Employee ID] = _curemp )
        )
    RETURN
        IF ( _curemp IN _compemp || _curemp IN _regemp, "Yes", "No" )​

    Best regards
    Rena
    Community Support Team _ Rena Ruan
    If this post helps, then please consider Accept it as the solution to help the other members find it more.