Reputation: 821
New user to Spotfire, I'm struggling to find a way to display the average time on the y-axis with a date range on the x-axis.
The only options presented to me when entering the duration column to the y-axis are:
Count UniqueCount CountBig Range
I was looking for the simple option of Average to show a simple line graph or bar chart of the average duration per day or month or week etc.
UPDATE: This is what I am trying to achieve but built in Excel
Anyone else come across this same issue?
Many Thanks
Upvotes: 2
Views: 1907
Reputation: 25142
Here are some steps to get what you want.
DatePart('mm',[yourDateColumn])
and name it [Month]
Avg(TimeSpan([yourDateColumn])) OVER ([Month])
and name it [AvgSpan][Month]
column on your X axisFirst([AvgSpan])
on your Y-Axis. You could also use Time()
instead of TimeSpan()
in the expression if that's more what you want. It's hard to see what you are basing the duration off of since usually that requires a Start
and End
time. If you are basing the duration off the beginning of that day then you can use this logic.
DateDiff("ss",DateTime(Date([dateField])),[dateField])
and name it [Duration]<BinByDateTime([yourDateColumn],"Year.Month",1)>
Avg([Duration])
Upvotes: 1