Hi, I am trying to compare a field (Job duration) with its weekly average. Something is wrong with my join. It is returning only the first row's values from the main search. Here is the query: index="n" | stats values(Job) by Date, Duration, Status | join lower(Job) max=0 [ search index="n" earliest=-8d | stats count(eval(if( Date>relative_time(now(),"-d"),NULL,1))) as weekly_total, sum(eval(if(Date>relative_time(now(),"-d"), 0,Duration))) AS total_duration by Job | eval Weekly_Avg=(total_duration/weekly_total) ] | table Job, Duration, Weekly_Avg, Status | dedup Job Data: Job Duration Date Status A 5 2021-03-03 Success B 9 2021-03-03 Failed A 5 2021-03-02 Success B 8 2021-03-02 Success A 6 2021-03-01 Success B 7 2021-03-01 Success What I want: Job Duration Weekly Avg Status A 5 5.5 Success B 9 7.5 Failed What I get: Job Duration Weekly Avg Status A 5 5.5 Success B 5 (from JobA) 7.5 Success (from Job A) ** Edit: I am finding there are duplicate rows in my data (exactly same data) which is also not helping. TIA
... View more