<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Same query is giving diff count in dashboard panel and search in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745606#M58640</link>
    <description>&lt;P&gt;How long is your search taking - you are searching a 61 minute window in your outer search and a 5 hour window in your append.&lt;/P&gt;&lt;P&gt;Is the search in your dashboard part of a base search?&lt;/P&gt;&lt;P&gt;How long do each of the individual searches take and if you put both of those individual searches into a dashboard as individual searches, so they give the correct result counts vs. running it as a search directly.&lt;/P&gt;</description>
    <pubDate>Wed, 07 May 2025 00:44:22 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2025-05-07T00:44:22Z</dc:date>
    <item>
      <title>Same query is giving diff count in dashboard panel and search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745604#M58639</link>
      <description>&lt;P&gt;Hello All ,&amp;nbsp;&lt;BR /&gt;I am running one query&amp;nbsp; and exactly sme query I am trying to run from search but I am getting diff counts .&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;```query for apigateway call```
index=aws_np earliest=1746540480 latest=1746544140  Method response body : sourcetype="aws:apigateway"
| rex field=_raw "Method response body : (?&amp;lt;json&amp;gt;[^$]+)" 
| spath input=json path="header.messageID " output=messageID  
| spath input=json path="payload.statusType.code" output=status 
| spath input=json path="payload.statusType.text" output=text 
| spath input=json path="header.action" output=action 
| where status=200   
| rename _time as request_time 
    ```dedupe is added to remove duplicates ```
| dedup messageID 
| append 
    [ search index="aws_np"   earliest=1746540480 latest=1746558480   
| rex field=_raw "messageID \": String\(\"(?&amp;lt;messageID &amp;gt;[^\"]+)" 
| rex field=_raw "source\": String\(\"(?&amp;lt;source&amp;gt;[^\"]+)" 
| rex field=_raw "type\": String\(\"(?&amp;lt;type&amp;gt;[^\"]+)" 
| rex field=_raw "detail-type\": String\(\"(?&amp;lt;detail_type&amp;gt;[^\"]+)"
| where  source="XXX"   and type="XXXXX" and detail_type="XXXX" 
|  stats distinct_count(  messageID ) as cnt_guid   by messageID  ,_time ``` by time is added because we are duplicate records of same time and guid ```
| stats count(cnt_guid) as published_count  by messageID  
| dedup messageID  
| fields messageID ,  published_count
    ] 
| stats  values(action) as request_type sum(published_count) as published_count2   by messageID 
|   where isnotnull(request_type)  
|  eventstats sum(published_count2) by request_type| dedup request_type
| search request_type="Create" OR request_type="Update"
| head 2
|  fields sum(published_count2)  request_type&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I ran query from dashboard panel&amp;nbsp; and then used RUN Search option to run it direclty but I am getting diff count . Search is giving correct result . Dashboard is giving less&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 23:44:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745604#M58639</guid>
      <dc:creator>Punnu</dc:creator>
      <dc:date>2025-05-06T23:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Same query is giving diff count in dashboard panel and search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745606#M58640</link>
      <description>&lt;P&gt;How long is your search taking - you are searching a 61 minute window in your outer search and a 5 hour window in your append.&lt;/P&gt;&lt;P&gt;Is the search in your dashboard part of a base search?&lt;/P&gt;&lt;P&gt;How long do each of the individual searches take and if you put both of those individual searches into a dashboard as individual searches, so they give the correct result counts vs. running it as a search directly.&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 00:44:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745606#M58640</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2025-05-07T00:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Same query is giving diff count in dashboard panel and search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745638#M58643</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308511"&gt;@Punnu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you running the search manually from the same app context as the dashboard?&amp;nbsp;&lt;/P&gt;&lt;P&gt;It could be that certain field extractions etc work differently if there is an app-context field eval, for example.&lt;/P&gt;&lt;P&gt;Are there any warnings when running it in the UI via the search bar?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 08:28:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745638#M58643</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-05-07T08:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Same query is giving diff count in dashboard panel and search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745693#M58650</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;Yes outer query is for 1 hr and inner is for 5 hrs . Are u saying these two in separate panel and use result of these in third one and append it ?&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 13:49:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745693#M58650</guid>
      <dc:creator>Punnu</dc:creator>
      <dc:date>2025-05-07T13:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Same query is giving diff count in dashboard panel and search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745738#M58658</link>
      <description>&lt;P&gt;You didn't answer how long your search is running for - I didn't mean the time range, I mean the amount of time the search takes to run. Also, see the other questions.&lt;/P&gt;&lt;P&gt;I'm suggesting you split out the searches just to experiment if both are giving the correct count when run individually in the dashboard AND in a manual search.&lt;/P&gt;&lt;P&gt;If you shorten the time window do the results then work.&lt;/P&gt;&lt;P&gt;You will need to provide more detail. Look at the search job properties and look at result count and scanCount.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 00:23:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Same-query-is-giving-diff-count-in-dashboard-panel-and-search/m-p/745738#M58658</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2025-05-08T00:23:59Z</dc:date>
    </item>
  </channel>
</rss>

