Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MRitter
Employee
Employee

Need to calculate the Avg of another calculation

I am running into a problem with my expression.

This is ultimately what I want:  I am trying to subtract any paused time from the total time and then get an average for the dimension type.

Avg(Interval(rejejctedtimestamp - submittedtimestamp,'hh')) - Sum(PausedTime))

It will not allow me to nest the functions. I can remove the Sum from PausedTime and I don't get the error.  But it doesn't work correctly.

Not sure what my options are here?

3 Replies
sunny_talwar

May be this

Avg(Aggr(
  RangeSum(
    rejejctedtimestamp,
    -submittedtimestamp,
    -Sum(PausedTime)
  )
, Dimension/s))

Replace Dimension/s with list of dimension/s where you are Sum(PausedTime) on.

MRitter
Employee
Employee
Author

Thanks Sunny

I am actually using a ValueList for the Dimension.

When the value is Paused Time I want to do this calculation.  When the value is No Paused Time then this is not an issue.

Can that be done with your logic?

sunny_talwar

I am not sure I follow... do you have a sample you can share to show this?