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

Sum of hh:mm:ss in a Table

Hi everybody,

 

i have an problem that´s driving me crazy! Hopefully somebody can help me.

 

I have a column with minutes, e.g. 200=200mins.

1.Goal:

I want to chance it into hh:mm:ss. To get it, I changed my MIN-Column into seconds.

-> MIN-Column * 60

Afterwards I converted my SEC-Column into hh:mm:ss with :

->

 

Zeit = 
    VAR Dauer = 'Tab_Kapapzitäten_Soll_IST_Werte'[Laufzeit in SEK]
    VAR STD   = INT(Dauer/3600)
    VAR MINS  =INT(MOD(Dauer-(STD*3600),3600)/60)
    VAR SEK   =ROUNDUP(MOD(MOD(Dauer-(STD*3600),3600),60),0)
    VAR H     =IF(LEN(STD)=1,
                CONCATENATE("0",STD),
                CONCATENATE("",STD)
                    )   
    VAR M     =IF(LEN(MINS)=1,
                CONCATENATE("0",MINS),
                CONCATENATE("",MINS)
                    )
    VAR S     =IF(LEN(SEK)=1,
                CONCATENATE("0",SEK),
                CONCATENATE("",SEK)
                    )
    RETURN
        CONCATENATE(H,CONCATENATE(":",CONCATENATE(M,CONCATENATE(":",S)))
                    )

 

Another way to reach my goal was to convert MIN-Column into hh:mm:ss with :

Column:

 

Umrechnung Bearbeitungszeit/Auftrag = FORMAT('Tab_Kapapzitäten_Soll_IST_Werte'[Laufzeit in MIN]/60/24,"HH:MM:SS")

 

 

Both ways works, but I don´t get the final result I need.

Both values shows the duration for an order.

E.g.:

Order No.Sum of Zeit (Time)Sum of Umrechnung Bearbeitungszeit/Auftrag (Conversion processing time/order)
F19010321:57:3321:57:33
F1908799:34:429:34:42

 

I need the sum  of the column. the right result would be 31:32:15 , I get 7:32:15.

 

Does anybody has an idea how solve my issue?

 

Thanky you very much!!!!!!!!!!!!!!!!!!!!!!!

 

have a good day

cfreiburg

 

1 ACCEPTED SOLUTION
2 REPLIES 2

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.