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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...