Splunk Search

How to get data by a field when not using stats

xvxt006
Contributor

Hi,

I am trying to get conversion and average order value and i am using eval function to calculate these. But i want to get these by different applications that we have. If i don't use stats i don't know how to get by application. If i use stats what function to use to just get the evaluated values? i tried values but did not work.

| stats dc(OrderNumber) as Orders, dc(sessionid) as Visits | eval CVR =(Orders/Visits)*100 | eval Conversion = round(CVR, 1) | eval AOV=(Revenue/Orders) | eval AOV = round(AOV, 1) | stats values(AOV), values(Conversion) by Application

Tags (1)
0 Karma
1 Solution

_d_
Splunk Employee
Splunk Employee

| stats dc(OrderNumber) as Orders, dc(sessionid) as Visits by Application | eval CVR =(Orders/Visits)*100 | eval Conversion = round(CVR, 1) | eval AOV=(Revenue/Orders) | eval AOV = round(AOV, 1)

View solution in original post

_d_
Splunk Employee
Splunk Employee

| stats dc(OrderNumber) as Orders, dc(sessionid) as Visits by Application | eval CVR =(Orders/Visits)*100 | eval Conversion = round(CVR, 1) | eval AOV=(Revenue/Orders) | eval AOV = round(AOV, 1)

rechteklebe
Path Finder

Try to use 'eventstats' instead of the first stats.

0 Karma

xvxt006
Contributor

Hi Below solution from d worked for me. I will try evenstats also and see if it works.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...