Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Avg function throwing an error

Hello,

I have an expression like this which works correctly.

Interval(if(len(Max(END_DATE))=0,Today(),Max(END_DATE))-Min(START_DATE),'dd')

But When i tried to do an average of it, it says Error in Expression.

Avg(Interval(if(len(Max(END_DATE))=0,Today(),Max(END_DATE))-Min(START_DATE),'dd'))

Could anyone understand the mistake in this? START_DATE and END_DATE are timestamps.

Thanks

Ramakanth

1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

You are embedding max() aggregation function into another aggregation function, avg(), which is not possible without using advanced aggregation aggr() function.

View solution in original post

1 Reply
swuehl
Champion III
Champion III

You are embedding max() aggregation function into another aggregation function, avg(), which is not possible without using advanced aggregation aggr() function.