I've following query...
What I'm interested in producing the output as,
OS Users Actions Actions_Per_User
IOS 20 200 10
Andriod 30 150 5
Total 50 350 7 (i.e. 250/5)
The following query,
How can I address this need..I tried using addcoltotals, but that does not help with the last column calculation for TOTAL row
pl help
index=mobile Action_Name=Page_View user_id!=NULL OS="Android" OR OS="IOS"|stats dc(user_id) as Users count as Launches by OS | eval unique_users= Users | eval actions_per_user= round((Launches/Users),2) | appendpipe [stats sum(Launches) as sum_launches sum(unique_users) as sum_unique_users] | eval avg_actions_per_user=round(sum_launches/sum_unique_users,0) | fields OS Users Launches actions_per_user avg_actions_per_user
Try this
index=mobile Action_Name=Page_View user_id!=NULL OS="Android" OR OS="IOS"
|stats dc(user_id) as Users count as Actions by OS
| appendpipe [stats sum(Actions) as Actions sum(Users) as Users | eval OS="Total" ]
| eval Actions_Per_Users=round(Actions/Users,0)
Try this
index=mobile Action_Name=Page_View user_id!=NULL OS="Android" OR OS="IOS"
|stats dc(user_id) as Users count as Actions by OS
| appendpipe [stats sum(Actions) as Actions sum(Users) as Users | eval OS="Total" ]
| eval Actions_Per_Users=round(Actions/Users,0)