
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Above function not working properly
I have a measure called Service.Service End Time. I want to get the previous record's Service.Service End Time and use it in an expression where I calculate the current row's Service.Service Start Time minus the previous records Service.Service End Time. I am getting partial results where sometimes it does the calculation and other times it returns nulls. The only times it works is when the previous Service.Service End Time and the current Service.Service Start Time are identical. The expression is:
=Interval(Time#([Service.Service Start Time], 'hh:mm TT')-Above(Time#([Service.Service End Time], 'hh:mm TT')), 'hh:mm')
I am calculating the gaps between appointments.
Thanks in advance.
- Tags:
- above function

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could try to do this on the front end in the script. Try something like this:
Newtable:
Load
*,
[Service.Service Start Time]-Previous([Service.Service End Time]) as TimeGap
;
Load
*
RESIDENT orginaltable
Order By YOURDIMENSION desc
;
DROP TABLE orginaltable;
