Forum Discussion

Mous007's avatar
Mous007
Helper IV
5 years ago
Solved

Task final status with multiple variables evaluation

Hi all,   I had a list of tasks and each task is linked to an Action and Finding. Some of the tasks as you see below can be linked to multiple actions and findings.   In order for a task to be cl...
  • CNENFRNL's avatar
    5 years ago

    Hi, Mous007 , you might want to try a measure in a calculated column,

     

    Final Status = 
    VAR __final =
        COUNTROWS (
            FILTER (
                FILTER ( Table1, Table1[Task ID] = EARLIER ( Table1[Task ID] ) ),
                Table1[Action Closed?] = "No" || Table1[Finding Closed?] = "No"
            )
        )
    RETURN
        IF ( __final, "Open", "Closed" )

     

     

    Alternatively, a measure also does the trick,

     

    Final =
    VAR __final =
        COUNTROWS (
            FILTER (
                FILTER ( ALL ( Table1 ), Table1[Task ID] = MAX ( Table1[Task ID] ) ),
                Table1[Action Closed?] = "No" || Table1[Finding Closed?] = "No"
            )
        )
    RETURN
        IF ( __final, "Open", "Closed" )