Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
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

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
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 🙂

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]))
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
Anonymous
Not applicable

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

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? 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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