Forum Discussion

CalexUK's avatar
CalexUK
Frequent Visitor
3 years ago
Solved

Counting Text Values Across Multiple Dynamic Columns by User

Hi I have a Matrix Table as below, I want to count the total number of learning activitys then work out the completion percentage, for example here there are 7 learning outcomes in total and line 1 ...
  • tamerj1's avatar
    tamerj1
    3 years ago

    Hi CalexUK 
    Should it be something like this?

    Result = 
    VAR CurrentStatus = VALUES ( 'Table'[Status] )
    VAR PercentCompleted = 
        DIVIDE ( 
            COUNTROWS ( FILTER ( 'Table', 'Table'[Status] = "Completed" ) ),
            COUNTROWS ( 'Table' )
        )
    RETURN
        IF ( 
            HASONEVALUE ( 'Table'[UserID] ) && HASONEVALUE ( 'Table'[Programmes] ),
            CurrentStatus,
            PercentCompleted + 0
        )