Thanks, but i need the duration broken down by hours and minutes. When I run the code below, it does not display the date just the schools on the right and then null for the legend. The code I ran is
index=summary_lms source=2q13Summary-student [inputlookup oracle.csv | where like(DISTRICT_NAME,"Plano Ind School District") AND like(DISTRICT_STATE,"TX") AND ACTIVE_STATUS=1 | lookup search_schid2uuid school_id OUTPUT sch_id | return 500 sch_id] | stats sum(duration) as duration by sch_id, stu_id | stats median(duration) as medianDuration by sch_id | eval hours=if(medianDuration/3600<1,0,round(medianDuration/3600)) | eval minutes=if(hours>0,(round(medianDuration/60)-(round(medianDuration/3600)60)),round(medianDuration/60)) |eval minutes=if(minutes<0,0,minutes) | eval seconds=if(minutes<60,(round(medianDuration/60)-(round((medianDuration/60).60))),round(medianDuration/60)) | lookup search_schid2uuid sch_id OUTPUT school_id | eval ACTIVE_STATUS=1 | lookup search_oracle school_id ACTIVE_STATUS OUTPUT SCHOOL_NAME DISTRICT_NAME DISTRICT_STATE | fields SCHOOL_NAME minutes hours | eval _time = strptime(date, "%m/%d/%Y")
| eval duration = (hours*60 + minutes)*60
| bin span=1w _time | eval readable = strftime(_time, "%m-%d") . " to " . strftime(relative_time(_time, "+6d"), "%m-%d")
| chart median(duration) over SCHOOL_NAME by readable
It displays this: http://workspl.blogspot.com/2015/01/blog-post.html
... View more