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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...