Forum Discussion

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

Calculate the average completion rate

Dear Experts,   I have a data set like this. This data set is to capture the completion rate of each task on specific days. But there are empty values since the user havn't update the progress.  ...
  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    8 years ago

    TomLU123

     

    We can use MAX instead of LASTDATE

     

    i.e.

     

    Measure =
    VAR Sumofpercentages =
        SUMX (
            VALUES ( Table1[Task] ),
            VAR Last_Checkpoint =
                CALCULATE ( MAX ( Table1[Check Point] ), Table1[Value] <> BLANK () )
            RETURN
                CALCULATE ( SUM ( Table1[Value] ), Table1[Check Point] = Last_Checkpoint )
        )
    VAR CountofTasks =
        COUNTROWS ( VALUES ( Table1[Task] ) )
    RETURN
        Sumofpercentages / CountofTasks