Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Applicable88
Creator III
Creator III

Substitute agg() in the load script

Hello,

I want to load a start time and a end time as a duration already  in the load script. It's a mess when it needs to be calculated later on, because the functions getting very long, instead just using the duration as a plain time or number to calculate. 

Due to many factors I have to aggr the time to many fields to filter the correct time.

Right now i'm using something like this:

hour(sum((aggr(Max(QueueFinishedTime),QueueIdentification,State,ActionName))-(aggr(Min(QueueStartedTime),QueueIdentification,State,ActionName))))

How to write this kind of calculation into the loading script? 

I hope someone has an idea. Thank you very much.

Best. 

1 Solution

Accepted Solutions
PriyankaShivhare
Creator II
Creator II

Hope this  Helps

Duration:
Load *,
maxTime - minTime as Duration;
Load Max(QueueFinishedTime) as maxTime ,
Min(QueueStartedTime) as minTime,
QueueIdentification,
State,
ActionName
Resident Source
group by QueueIdentification,State,ActionName

in the Front End Expression : hour(sum(Duration))

Thanks,
Priyanka

View solution in original post

1 Reply
PriyankaShivhare
Creator II
Creator II

Hope this  Helps

Duration:
Load *,
maxTime - minTime as Duration;
Load Max(QueueFinishedTime) as maxTime ,
Min(QueueStartedTime) as minTime,
QueueIdentification,
State,
ActionName
Resident Source
group by QueueIdentification,State,ActionName

in the Front End Expression : hour(sum(Duration))

Thanks,
Priyanka