Forum Discussion

SantoshKumar's avatar
SantoshKumar
Icon for Microsoft Employee rankMicrosoft Employee
7 years ago
Solved

Hours Calculation result after excluding the Days

Hi,  I need to Modify Hours Column in My table.  Currently i have two Columns 1. Days 2. Hours as shown in the pic below. Hours value at present is Total Hours  but my requirement is to get Ho...
  • v-frfei-msft's avatar
    7 years ago

    Hi SantoshKumar,

     

    Here we can use MOD function to work on it.

     

    Hours = IF(Table1[Days]=1,0,MOD(DATEDIFF(Table1[StartTime],Table1[EndTime],HOUR),24))

     

    Regards,

    Frank