Forum Discussion

NicoHa's avatar
NicoHa
Regular Visitor
1 year ago
Solved

Divide time by whole number

hey there,


I want a measure that divides time by whole number, and get the result as time.

The first column (data type time) should be divided by the second colum (data type whole number).

The result should be date type 'time'.

 

thanks in advance!

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    hello,

    create this new column.

    newColumn =
    
    VAR seconds = 
    HOUR(Table[Aantal uren mw + omk]) * 60 * 60 + MINUTE(Table[Aantal uren mw + omk])* 60 + SECOND(Table[Aantal uren mw + omk])
    
    VAR divided = seconds / Table[Aantal stuks]
    
    RETURN
    TIME(0, 0, divided)



2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    hello,

    create this new column.

    newColumn =
    
    VAR seconds = 
    HOUR(Table[Aantal uren mw + omk]) * 60 * 60 + MINUTE(Table[Aantal uren mw + omk])* 60 + SECOND(Table[Aantal uren mw + omk])
    
    VAR divided = seconds / Table[Aantal stuks]
    
    RETURN
    TIME(0, 0, divided)