Splunk Search

appendcols with timechart when queried for longer window - appendcols results empty

sethuk555
Engager

Hi,

index=test sourcetype=access "READ/1.1" idvalue="" | timechart count(idvalue) as TotalRequests span=30m | appendcols [ search "READ/1.1" idvalue="" | timechart dc(idvalue) as Distinctrequests span=30m ] | eval Repeatedrequests=TotalRequests - Distinctrequests

With the above query I need to just pull the total and unique requests.For smaller window the query results are fine.If the search duration is for longer window say 7 days then the appendcols search "Distinctrequests" values are 0 in the beginning of the search window even though its not 0 actually.

Please let me know if any corrections in the query to be made.

Tags (1)
0 Karma

sundareshr
Legend

You have a idvalue="" in your root search, which could probably be why you're getting 0 results. Change that to idvalue=*

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...