Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Total Measures issue - within a Matrix

Hi Everyone,   I understand the total measures issue is commonplace. I have done some research but can't identify a solution to this particular issue, so I hope someone can help out.   My report ...
  • Icey's avatar
    6 years ago

    Hi Anonymous ,

     

    Try this:

    Measure =
    VAR a =
        CALCULATE (
            [Percent Complete by Task Status],
            '13/05/2020 - all tasks'[Task Status] = "Open"
        ) * 0
    VAR b =
        CALCULATE (
            [Percent Complete by Task Status],
            '13/05/2020 - all tasks'[Task Status] = "In progress"
        ) * 0.5
    VAR c =
        CALCULATE (
            [Percent Complete by Task Status],
            '13/05/2020 - all tasks'[Task Status] = "In Review"
        ) * 0.75
    VAR d =
        CALCULATE (
            [Percent Complete by Task Status],
            '13/05/2020 - all tasks'[Task Status] = "Complete"
        ) * 1
    RETURN
        IF (
            HASONEVALUE ( '13/05/2020 - all tasks'[Task Status] ),
            SWITCH (
                SELECTEDVALUE ( '13/05/2020 - all tasks'[Task Status] ),
                "Open", a,
                "In progress", b,
                "In Review", c,
                "Complete", d
            ),
            a + b + c + d
        )
    

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.