Skip to Content

Calculations on hours ?

Dear All,

I need to do a cell level calculation, if i do that in bex i cannot incorporate in webi based on the limitation. So i am trying to do that in webi level. The problem i am facing is i have a bex output where the calculation is based on hours. Take a look at the output below in bex.

When i take the same report to webi report it displays as same, now i need to sum up the hours here based on the "IDEAL TIME FOR REASONS". How to achieve this in webi. Appreciate your help on this.

1.PNG (12.5 kB)
4.PNG (34.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 10, 2015 at 11:23 AM

    You have to first indentify hour,minutes & seconds from your time difference field using formula like

    Hour =if length([time difference) = 7 then  substr([time difference];1;1) else  substr([time difference];1;2)

    Minutes =if length([time difference) = 7 then  substr([time difference];3;2) else  substr([time difference];4;2)

    Seconds = if length([time difference) = 7 then  substr([time difference];6;2) else  substr([time difference];7;2)

    Now all of these would be measure objects

    after that just add the hour ,minutes ,seconds by using variable

    var_total = [hours]+[minutes]+[seconds]

    another variable

    var_hours = [var_total]/24

    var_minutes = ([var_total] - [var_hours]*24)/60

    var_seconds = [var_total] - [var_hours]*24-[var_minutes]*60

    And then concate all the three variables which will give you result in hh24:mm:ss format.

    Thanks,
    Swapnil

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 10, 2015 at 07:03 AM

    Cell calculations are supported when using bics, can you give it a try?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Suman Thangadurai

      Cell calculations are supported in Web Intelligence using BICS, so in your case I would try to get it working with BEx.