cancel
Showing results for 
Search instead for 
Did you mean: 

Webi - Sum number and convert to hh:mm

0 Kudos

Hi,

Need your help to complete my webi report please

Had two columns (hours column and minutes column)

I want to create variable to Sum hours & minutes and convert to hh:mm (so it will show the total)

Thank you,

Accepted Solutions (1)

Accepted Solutions (1)

ayman_salem
Active Contributor
0 Kudos

define following variables:

Total =Sum([Hours])+Sum([minutes])/60

TotalHHmm =Floor([Total])+":"+([Total]-Floor([Total]))*60

0 Kudos

Thanks man. It’s working.

However, It cannot be used as measure! I changed it to measure to use it for charts but unfortunately it is not allowing me to choose it. Any idea of an extra step? Appreciate your help and time

ayman_salem
Active Contributor
0 Kudos

"TotalHHmm" variable like a formatted plaintext and can not be used as a measure.

Instead, use the "Total" variable for your chart and other calculations.

0 Kudos

In that case it wouldn’t show the correct value right, when i use the total and show it as value it shows there is discrepancy a little-bit

ayman_salem
Active Contributor
0 Kudos

The correct value is displayed. Only the minute is given as decimal "minute / 60"

(see above example 24 min --> 0.4)

ayman_salem
Active Contributor

You can use it in the diagram as in the following example: (Table with "A, Total, TotalHHmm" is used for the chart)

Answers (0)