Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Missing total hours with calculation

Hi everyone,   I'm trying to create a weekly overview of employees who work/book more than 1 hours less than they should. For example: my contract is for 40 hours a week, if I book only 38 hours my...
  • v-juanli-msft's avatar
    7 years ago

    Hi Anonymous 

    Which table and column does the measure [Directe mdw. totaal (Geselecteerd)] use?

     

    If it uses columns in "entries" table, 

    i create measures as below, it can works on my side.

     

    Please check if it fits your scenario.

    Measure1 =
    CALCULATE (
        SUM ( contacts[con] ),
        FILTER (
            contacts,
            contacts[direct/indirect] = TRUE ()
                && contacts[Is active] = TRUE ()
                && contacts[effective date] <= MAX ( 'calendar'[Date] )
                && contacts[expiration date] >= MIN ( 'calendar'[Date] )
        )
    )
    
    measure2 = SUM(entries[value])
    
    Measure3 =
    CALCULATE (
        [measure2] - SUM ( contacts[con] ),
        FILTER (
            contacts,
            contacts[direct/indirect] = TRUE ()
                && contacts[Is active] = TRUE ()
                && contacts[effective date] <= MAX ( 'calendar'[Date] )
                && contacts[expiration date] >= MIN ( 'calendar'[Date] )
        )
    )
    

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.