Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Measure SUM

Hello, I have a table visual with number of travel and non travel days per emplyee. The requirements is that each person is supposed to travel 301 days out of the year, so I am trying to make a measu...
  • tamerj1's avatar
    3 years ago

    Hi Anonymous 

    Please try

    Days Difference =
    SUMX (
    VALUES ( 'Labor Cost per Day'[Person] ),
    CALCULATE (
    VAR diff =
    SUM ( 'Labor Cost per Day'[Person Traveling] )
    RETURN
    IF ( diff >= 301, 0, 301 - diff )
    )
    )