Hello everyone,
I have a search as follows which displays the usernames, their accessing application count on that day, and the average of total users average accessing application count
index=foo sourcetype = foo | | stats dc(A) as accessing_application_count by usernames |eventstats avg(accessing_application_count) as avg_accessing_application_count |stats max(accessing_application_count) as max_accessing_application_count max(avg_accessing_application_count) as avg_accessing_application_count by usernames
Which Displays something as follows
usernames max_accessing_application_count avg_accessing_application_count
abc 3 4.982456
def 0 4.982456
ghi 10 4.982456
Now I want to calculate similarly for each user's last 3 days max_accessing_application_count which should be calculated based on each day's max_accessing_application_count of last 3 days, and the average too. like below
usernames max_accessing_application_count last_3days_max_accessing_ avg_accessing_application_count last_7d_avg
abc 3 6 4.982456 7.8
def 0 4 4.982456 7.8
ghi 10 7 4.982456 7.8
average should be calculated as each days average for the last 3 days and that 3 days average of that.
Please suggest if you have any idea to help me regarding this query.
Updated :-
... View more