Forum Discussion

Kruz_R's avatar
Kruz_R
New Member
3 years ago
Solved

Calculated column based on multiple criteria from another table

Hello,   I hope someone can assist or point me toward a relevant post.   I am struggling to create a calculated column Table 1[READY] that meets criteria from Table 2 [Prof] and [Current] columns...
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    Please check the below picture and the attached pbix file.

    It is for creating a new column.

     

     

    Ready CC =
    VAR _category =
        FILTER ( Table2, Table2[Employee] = EARLIER ( Table1[Employee] ) )
    RETURN
        IF (
            MAXX ( FILTER ( _category, Table2[Prof] = 1 ), Table2[Current] ) = "y"
                && MAXX ( FILTER ( _category, Table2[Prof] = 2 ), Table2[Current] ) = "y"
                && MAXX ( FILTER ( _category, Table2[Prof] = 3 ), Table2[Current] ) = "y"
                && OR (
                    MAXX ( FILTER ( _category, Table2[Prof] = 4 ), Table2[Current] ) = "y",
                    MAXX ( FILTER ( _category, Table2[Prof] = 5 ), Table2[Current] ) = "y"
                ),
            "Yes",
            "No"
        )