
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Division Calculation is not working
Hi All,
I have below table on my present data set.
See very first row. I want Duration/Count = 58/1 = 58 and similarly for other rows. And In summary level also it is sum(duration) / count(number). But this is showing some weird value.
My Script:
Duration = Interval([closed_at] - [sys_created_on] ,'mm')
Number Count = count(number)
Duration/Count = Interval([closed_at] - [sys_created_on] ,'mm')/count(number)
Could you please help on this.
Thanks,
Sarif
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your fields closed_at and sys_created_on are timestamp fields. Timestamp fields have numeric value and the unit of those values is in days. If you subtract two of those values you get a result that's also in units of a day. The interval function doesn't change the numeric value, but only the way it is displayed.
A day has 24 hours. An hour has 60 minutes. So a day has 24*60 = 1440 minutes.
talk is cheap, supply exceeds demand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Duration is really a number that's a fraction of a day. You merely format it so it shows as minutes. The actual value is 1440 times less (24 hours * 60 minutes). So multiply Duration/Count with 1440 and you'll see the numbers you expect.
talk is cheap, supply exceeds demand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi gysbert..it is matching..however I could not understand the logic. It would be really helpful if you can explain it in details.
Thanks,
Sarif
looking for your reply...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your fields closed_at and sys_created_on are timestamp fields. Timestamp fields have numeric value and the unit of those values is in days. If you subtract two of those values you get a result that's also in units of a day. The interval function doesn't change the numeric value, but only the way it is displayed.
A day has 24 hours. An hour has 60 minutes. So a day has 24*60 = 1440 minutes.
talk is cheap, supply exceeds demand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks dear..this is helpful ...
