Forum Discussion

navarrobr's avatar
navarrobr
Frequent Visitor
10 years ago
Solved

Calculating Over Time

Hello. I was wondering if someone could help me with the following situation:   Imagine that I have a table of hours for employees, like this:   name date hours hour type Marcelo 01/05/...
  • v-haibl-msft's avatar
    10 years ago

    navarrobr

     

    Please try to update the measure of Over Time like below.

     

    Over Time = 
    SUMX (
        VALUES ( Tabela[date] ),
        IF ( [Worked Hours] > [Available Hours], [Worked Hours] - [Available Hours], 0 )
    )

     

    Best Regards,

    Herbert

     

  • navarrobr's avatar
    navarrobr
    10 years ago

    Thank you, I used your insight to find a better solution:

     

    Over Time = 
    SUMX (
        SUMMARIZE( Tabela[date], Tabela[nome] ),
        IF ( [Worked Hours] > [Available Hours], [Worked Hours] - [Available Hours], 0 )
    )