Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am stuck with an expression:
My reqmnt:
I calculated the datediff between two dates for an user: Interval(Max(RespondTime)-JoinDt,'d')
I want to calculate the average date diff for all users:
When i try something like this its throwing an error:
sum( Interval(Max(RespondTime)-JoinDt,'d'))/Count(UserId)
Any help??
And put it in a text object rather than a chart. Oh, and you can wrap it in Interval() I think to get it formatted in minutes:
Interval(Avg(Aggr((Max(RespondTime)-JoinDt),UserID)))
Hope this helps,
Jason
Interval() is just a formatting function, I believe. Also, the expression you need will vary depending if it is in a chart or not and what the dimensions are.
What exactly are you trying to achieve?
interval() function i believe it calculates the datediff between two dates.
and i am using the above expression in a chart(table) with no dimensions)
No dimensions? So you just want a single number returned that is the average of Max(RespondTime)-JoinDt, across all users? Max(RespondTime) is no the global Max() but a per-user Max()?
I this is your requirement then you will need to use Aggr().
Is this what you want to achieve?
Hi,
I think JoinDt is a dimension and having multiple values. If so, try getting the single value by using max() or min(). That's why you are getting an error.
If possible attach a sample file.
Regards,
Jagan.
Exactly Jason.
Can you please send me the expression with Aggr fucntion.I tried but its not wrkn.
Try this:
Avg(Aggr((Max(RespondTime)-JoinDt),UserID))
And put it in a text object rather than a chart. Oh, and you can wrap it in Interval() I think to get it formatted in minutes:
Interval(Avg(Aggr((Max(RespondTime)-JoinDt),UserID)))
Hope this helps,
Jason
Thanks Jason !! It worked!!