Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to create some formulas with two calculated fields. Both calculated fields (EXTRA_TIME_1 and EXTRA_TIME_2) are in the format 'hh:ss:mm'. I noticed something went wrong when I wanted to create some formulas with those calculated fields. I have made a simple table to show you the problem. When I display both fields as a dimension in the table, the field shows the correct value. But when I add a simple measure (EXTRA_TIME_1 + EXTRA_TIME_2), the value is not correct. What is going wrong?
Thanks in advance.
From a quick eyeball it seems as if the discrepancies are all by a factor of 24 hours adrift, maybe look at the underlying numeric vales of your EXTRA_TIME_1 & EXTRA_TIME_2 fields bearing in mind the underlying interval numbers are such that :
1 is 1 day as in 24 hours
0.5 is half a day as in 12 hours
1.5 is a day and a half is 36 hours
A frig might be to only use the frac() values in your calculation, but I suggest caution frigging it like that before understanding the underlying root cause.
frac(EXTRA_TIME_1) + frac(EXTRA_TIME_2)
Did you Check in number format as Duration
Yes the number format is in duration
I am not sure how to extract "hh:mm:ss" but you can use time function after summing up times.
Time(Timestamp('01.01.2018 09:00:00','hh:mm:ss')+Timestamp('03.01.2018 11:00:00','hh:mm:ss'))
When i do this the same problem occures
From a quick eyeball it seems as if the discrepancies are all by a factor of 24 hours adrift, maybe look at the underlying numeric vales of your EXTRA_TIME_1 & EXTRA_TIME_2 fields bearing in mind the underlying interval numbers are such that :
1 is 1 day as in 24 hours
0.5 is half a day as in 12 hours
1.5 is a day and a half is 36 hours
A frig might be to only use the frac() values in your calculation, but I suggest caution frigging it like that before understanding the underlying root cause.
frac(EXTRA_TIME_1) + frac(EXTRA_TIME_2)
Thanks! This solved the problem