Splunk Search

stats option compatibility

VI371887
Path Finder

Does stats support function inside function like shown below ?

Where first i want to take percentile90 of PERCENT90 field value and then sum it up by function as shown below in query

 search........... | eval PERCENT90=round(PERCENT90,2)  |  eval DAY=strftime(_time, "%d-%m-%Y:%H:%M:%S")    |  stats DC(DAY) as DayCount **sum(Perc90(PERCENT90))**  by FUNCTION

I am trying to get the below result

search........ | rex field=source "APP_(?.*)"  | eval PERCENT90=round(PERCENT90,2)  |  eval DAY=strftime(_time, "%d-%m-%Y:%H:%M:%S")    | stats **Perc90**(PERCENT90) as **record** |   stats DC(DAY) as DayCount **sum(record)** as SUMA by FUNCTION

so I want to pass the percentile90 calculation done from first stats to next stats sum()

0 Karma

wenthold
Communicator

try changing | stats perc90(PERCENT90) to | eventstats perc90(PERCENT90)

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...