- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
selvam_sekar
Path Finder
04-17-2024
09:30 AM
Hi,
if i run this query in simple search bar it works fine. However, when i create panel and add the below, i'm getting error as waiting for input.
Please could you advise?
index=hello sourcetype=welcome
| stats max(DATETIME) as LatestTime
| map search="search index=hello sourcetype=welcome DATETIME=$LatestTime$"
| stats sum(HOUSE_TRADE_COUNT) as HOUSE_Trade_Count
Thanks,
selvam.
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ITWhisperer

SplunkTrust
04-17-2024
09:39 AM
Try doubling up the $'s as single $ are for tokens in dashboards.
index=hello sourcetype=welcome
| stats max(DATETIME) as LatestTime
| map search="search index=hello sourcetype=welcome DATETIME=$$LatestTime$$"
| stats sum(HOUSE_TRADE_COUNT) as HOUSE_Trade_Count
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
selvam_sekar
Path Finder
04-17-2024
11:09 AM
Thanks @ITWhisperer .
I also found an issue, if I run this query for yesterday I am getting the result as 44Million count but when I run the search for last 7 days I am getting only 23Million results.
Any suggestion to fix?
index=hello sourcetype=welcome
| stats max(DATETIME) as LatestTime
| map search="search index=hello sourcetype=welcome DATETIME=$$LatestTime$$"
| stats sum(HOUSE_TRADE_COUNT) as HOUSE_Trade_Count
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ITWhisperer

SplunkTrust
04-18-2024
12:09 AM
Suggestion is "don't use map". Map is an expensive, resource intensive, and slow command. Other ways to achieve this might be
index=hello sourcetype=welcome
| eventstats max(DATETIME) as LatestTime
| where DATETIME=LatestTime
| stats sum(HOUSE_TRADE_COUNT) as HOUSE_Trade_Count
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ITWhisperer

SplunkTrust
04-17-2024
09:39 AM
Try doubling up the $'s as single $ are for tokens in dashboards.
index=hello sourcetype=welcome
| stats max(DATETIME) as LatestTime
| map search="search index=hello sourcetype=welcome DATETIME=$$LatestTime$$"
| stats sum(HOUSE_TRADE_COUNT) as HOUSE_Trade_Count
