Forum Discussion

Rana80's avatar
Rana80
Frequent Visitor
2 years ago
Solved

CONTAINSSTRING with counting rows

Hi    I'm  trying to create an calculated column that counts how many times the phrase  "marked this task as resolved" occurs for each Task ID   I have done this with a calculated column call ...
  • Ahmedx's avatar
    2 years ago

    pls try this

    Column = VAR t1 = 'Table'[Task JD]
    VAR t2 =
        CONTAINSSTRING('Table'[Message],"marked this task as resolved")
    VAR tbl =
        FILTER(ALL( 'Table' ),
            'Table'[Task JD] = t1&& 
                CONTAINSSTRING('Table'[Message],"marked this task as resolved" )= TRUE)
    RETURN
        IF( t2, RANKX( tbl, 'Table'[Created On], , ASC, DENSE ) )