Reply
avatar user
Anonymous
Not applicable

Problems with hours greater than 24 hours

Hello,

I am facing the problem of getting time over 24Hours in the measure field.

Actually I want the sum of time of different people working in 1 day (eg: 13:33:55 + 20:44:23 +15:31:11 + .......)

Thankx 

3 ACCEPTED SOLUTIONS
Omega
Impactful Individual
Impactful Individual

You want to calculate how many hours each employee been working? 

View solution in original post

Omega
Impactful Individual
Impactful Individual

Create the below column: 

 

Column = 24-HOUR(Table2[Hourss])

Then, create the below measure: 

 

Measure = CALCULATE(SUM(Table2[Column]),ALLEXCEPT(Table2,Table2[Employee]))

View solution in original post

avatar user
Anonymous
Not applicable

DAX Mode ( In this mode you can agregate for any dimension)

 

QtSegundos = SUM([Seconds])

 

Time=
VAR Horas = INT([QtSegundos]/3600)
VAR Minutos = INT(([QtSegundos] - (Horas * 3600))/60)
VAR Segundos = MOD([QtSegundos];60)
RETURN
Horas&":"&FORMAT(Minutos;"00")&":"&FORMAT(Segundos;"00")

View solution in original post

8 REPLIES 8
avatar user
Anonymous
Not applicable

DAX Mode ( In this mode you can agregate for any dimension)

 

QtSegundos = SUM([Seconds])

 

Time=
VAR Horas = INT([QtSegundos]/3600)
VAR Minutos = INT(([QtSegundos] - (Horas * 3600))/60)
VAR Segundos = MOD([QtSegundos];60)
RETURN
Horas&":"&FORMAT(Minutos;"00")&":"&FORMAT(Segundos;"00")
Omega
Impactful Individual
Impactful Individual

Can you share sample data? I don't think I answered your question 🙂

avatar user
Anonymous
Not applicable

1st Nov    abc    12:32:44

2nd nov   abc      14:33:23

3rd Nov   abc      13:33:33

1st Nov    pqr      20:22:12

2nd nov   pqr      16:34;54

3rd Nov   pqr       15:46:33

1st Nov    mnb     20:52:19

2nd nov   mnb      18:34;58

3rd Nov   mnb     16:46:37

 

so now i want the sum of abc(1st, 2nd, 3rd Nov), pqr(1st, 2nd, 3rd Nov), mnb(1st, 2nd, 3rd Nov) resp.

ie: (12:32:44 + 14:33:23 + 13:33:33)  of abc of 1st, 2nd & 3rd Nov resp.

Omega
Impactful Individual
Impactful Individual

Create the below column: 

 

Column = 24-HOUR(Table2[Hourss])

Then, create the below measure: 

 

Measure = CALCULATE(SUM(Table2[Column]),ALLEXCEPT(Table2,Table2[Employee]))
avatar user
Anonymous
Not applicable

Sum Duration1 =

VAR TotalSeconds=SUMX('Working Hr & Productivity - Nov',HOUR('Working Hr & Productivity - Nov'[Total Worked (Rota)])*3600+MINUTE('Working Hr & Productivity - Nov'[Total Worked (Rota)])*60+SECOND('Working Hr & Productivity - Nov'[Total Worked (Rota)]))
VAR Days =TRUNC(TotalSeconds/3600/24)
VAR Hours = TRUNC((TotalSeconds-Days*3600*24)/3600)
VAR Mins =TRUNC(MOD(TotalSeconds,3600)/60)
VAR Secs = MOD(TotalSeconds,60)
return IF(DAYS=0,"",IF(DAYS>1 ,DAYS *24 + Hours,Days)&":"&IF(Mins<10,"0"&Mins,Mins)&":"&IF(Secs<10,"0"&Secs,Secs))
 
// this work
avatar user
Anonymous
Not applicable

The time is diplaying 00:50:00 where the exact sum of the time is 168:50:00

avatar user
Anonymous
Not applicable

Thanks.

But the entire field is coming to be 00:00:00

Omega
Impactful Individual
Impactful Individual

You want to calculate how many hours each employee been working? 

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)