Forum Discussion

TomLU123's avatar
TomLU123
Icon for Helper III rankHelper III
7 years ago
Solved

Count the Completed Task to track the completion rate

Dear Expert, 

 

I have a data set like below to track the completion status of each task. 

TaskAssigned toStatus
Task ASmithCompleted
Task AAndyIn progress
Task AJoeCompleted
Task AMandyNot Started
Task BSmithCompleted
Task BAndyNot Started
Task BMandyNot Started

 

I wish to create measrues to track the ①# of "Completed" of each task, ②the Completion Rate of each task (# of Completed/# of people this task assigned to). For example, the expected output would be like this:

Task# of CompletionCompletion Rate 
Task A250%
Task B133.30%

 

Is it possible to create measures to achieve that?

Many thanks!

  • this code should work

    # of Completed = CALCULATE(COUNTA('Table'[Status]), 'Table'[Status]="Completed")
    
    Completion Rate = DIVIDE([# of Completed], COUNTA('Table'[Status]))

    it counts the rows in the tablem so if the table you presented is an aggragation then additinal SUMMARIZE/GROUPBY will be necessary

1 Reply

  • Stachu's avatar
    Stachu
    Icon for Community Champion rankCommunity Champion

    this code should work

    # of Completed = CALCULATE(COUNTA('Table'[Status]), 'Table'[Status]="Completed")
    
    Completion Rate = DIVIDE([# of Completed], COUNTA('Table'[Status]))

    it counts the rows in the tablem so if the table you presented is an aggragation then additinal SUMMARIZE/GROUPBY will be necessary