Forum Discussion

Nnamarie_1997's avatar
Nnamarie_1997
Frequent Visitor
4 years ago
Solved

Add column based on another column values from another table

Hi, Good day. Asking for your help, I am only a beginner. I am struggling to get the Status in Table 2 that excludes Process #1, by using New column?   These are my 2 sample tables:   A...
  • Jihwan_Kim's avatar
    4 years ago

     

    New Table1 =
    ADDCOLUMNS (
    VALUES ( Table1[Col 1] ),
    "@status",
    CALCULATE (
    VAR currentcategory =
    MAX ( Table1[Col 1] )
    VAR withoutprocessone_withnotyetdone =
    FILTER (
    Table1,
    Table1[Col 1] = currentcategory
    && Table1[Process] <> 1
    && Table1[Remarks] = "Not Yet Done"
    )
    RETURN
    IF ( COUNTROWS ( withoutprocessone_withnotyetdone ) > 0, "OnGoing", "Complete" )
    )
    )