Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Worklog - Total is Wrong

Hi,  I am working on the Team Worklog and for some reason the Capacity total is coming wrong.   It's a simple worklog. The total for Capacity should be '469' but it's showing '784'.     T...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi @joydeep7,

     

    AFAIK, measure formulas has different calculation logic on total level. You need to add some conditions and specific formula to handling total level calculation.

     

    Sample formula:

    Capacity =
    IF (
        ISFILTERED ( Worklogs[Full name] ),
        DISTINCTCOUNT ( Worklogs[Full name] ) * DISTINCTCOUNT ( Worklogs[Work date] )
            * 7,
        SUMX (
            SUMMARIZE (
                Worklogs,
                [Full name],
                [Work date],
                "Capa", DISTINCTCOUNT ( Worklogs[Full name] ) * DISTINCTCOUNT ( Worklogs[Work date] )
                    * 7
            ),
            [Capa]
        )
    )

     

     

     

    Reference link:
    Clever Hierarchy Handling in DAX

     

    Regards,

    Xiaoxin Sheng