<?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: Issue with Splunk query in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694395#M12569</link>
    <description>&lt;P&gt;No, that is the complete opposite of what I am saying!&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index= abc
| eval completion_time=strptime(COMPLETED_TIMESTAMP, "%Y-%m-%dT%H:%M:%S.%3QZ")
| stats count by completion_time FULFILLMENT_START_TIMESTAMP _time
| eval lead_time = (completion_time - FULFILLMENT_START_TIMESTAMP)
| timechart max(lead_time) as "Maximum" avg(lead_time) as "Average" min(lead_time) as "Minimum"&lt;/LI-CODE&gt;&lt;P&gt;Keep the values numeric differences between timestamps - if you want, you could divide the values by 60 to get minutes&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2024 11:51:39 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-07-26T11:51:39Z</dc:date>
    <item>
      <title>Issue with Splunk query</title>
      <link>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694384#M12566</link>
      <description>&lt;P&gt;I am working on the below query in which I want to calculate the lead_time in HH:SS. This query is giving me some results in statical mode but not giving any results with linechart. Please help me fix it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Results with statical mode.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uagraw01_0-1721988295271.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31911iBAC87DCE30EDD699/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uagraw01_0-1721988295271.png" alt="uagraw01_0-1721988295271.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;No results showing while using "line chart"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uagraw01_1-1721988332338.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31912iA144A50EA541E8B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uagraw01_1-1721988332338.png" alt="uagraw01_1-1721988332338.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below is the complete query:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;index= abc&lt;BR /&gt;| eval completion_time=strptime(COMPLETED_TIMESTAMP, "%Y-%m-%dT%H:%M:%S.%3QZ")&lt;BR /&gt;| stats count by completion_time FULFILLMENT_START_TIMESTAMP _time&lt;BR /&gt;| eval lead_time = (completion_time - FULFILLMENT_START_TIMESTAMP)&lt;BR /&gt;| eval hours=floor(lead_time / 3600)&lt;BR /&gt;| eval minutes=floor((lead_time % 3600) / 60)&lt;BR /&gt;| eval formatted_minutes=if(minutes &amp;lt; 10, "0" . minutes, minutes)&lt;BR /&gt;| eval HH_MM = hours . ":" . formatted_minutes&lt;BR /&gt;| timechart max(HH_MM) as "Maximum" avg(HH_MM) as "Average" min(HH_MM) as "Minimum"&lt;BR /&gt;| eval hours=floor(Maximum / 3600)&lt;BR /&gt;| eval minutes=floor((Maximum % 3600) / 60)&lt;BR /&gt;| eval formatted_minutes=if(minutes &amp;lt; 10, "0" . minutes, minutes)&lt;BR /&gt;| eval max_HH_MM = hours . ":" . formatted_minutes&lt;BR /&gt;| eval hours=floor(Average / 3600)&lt;BR /&gt;| eval minutes=floor((Average % 3600) / 60)&lt;BR /&gt;| eval formatted_minutes=if(minutes &amp;lt; 10, "0" . minutes, minutes)&lt;BR /&gt;| eval avg_HH_MM = hours . ":" . formatted_minutes&lt;BR /&gt;| eval hours=floor(Minimum / 3600)&lt;BR /&gt;| eval minutes=floor((Minimum % 3600) / 60)&lt;BR /&gt;| eval formatted_minutes=if(minutes &amp;lt; 10, "0" . minutes, minutes)&lt;BR /&gt;| eval min_HH_MM = hours . ":" . formatted_minutes&lt;BR /&gt;| table _time max_HH_MM avg_HH_MM min_HH_MM&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 10:07:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694384#M12566</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-07-26T10:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Splunk query</title>
      <link>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694392#M12567</link>
      <description>&lt;P&gt;The values need to be numeric e.g. number of minutes, you can't use string values such as HH:MM to display on a chart&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 11:00:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694392#M12567</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-26T11:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Splunk query</title>
      <link>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694393#M12568</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;Do you mean like this ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval max_HH_MM = tostring(max_HH_MM)

| eval avg_HH_MM = tostring(avg_HH_MM)

| eval min_HH_MM = tostring(min_HH_MM)
 &lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 Jul 2024 11:05:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694393#M12568</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-07-26T11:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Splunk query</title>
      <link>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694395#M12569</link>
      <description>&lt;P&gt;No, that is the complete opposite of what I am saying!&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index= abc
| eval completion_time=strptime(COMPLETED_TIMESTAMP, "%Y-%m-%dT%H:%M:%S.%3QZ")
| stats count by completion_time FULFILLMENT_START_TIMESTAMP _time
| eval lead_time = (completion_time - FULFILLMENT_START_TIMESTAMP)
| timechart max(lead_time) as "Maximum" avg(lead_time) as "Average" min(lead_time) as "Minimum"&lt;/LI-CODE&gt;&lt;P&gt;Keep the values numeric differences between timestamps - if you want, you could divide the values by 60 to get minutes&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 11:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694395#M12569</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-26T11:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Splunk query</title>
      <link>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694400#M12570</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=wma_bext TYPE=FULFILLMENT_REQUEST STATUS="Marshalling"
| eval completion_time=strptime(COMPLETED_TIMESTAMP, "%Y-%m-%dT%H:%M:%S.%3QZ")
| stats count by completion_time FULFILLMENT_START_TIMESTAMP _time
| eval lead_time = (completion_time - FULFILLMENT_START_TIMESTAMP)
| timechart max(lead_time) as "Maximum" avg(lead_time) as "Average" min(lead_time) as "Minimum"
| foreach Maximum Average Minimum [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;_hours=round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'/3600, 2), &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;_minutes=round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'/60, 2) ]&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;When I use above query to combine hours and minutes and again , then i used to write like this "| eval max_d = Maximum_hours. ":" .Maximum_minutes" and again it comes into a string mode. Please suggest me how I can showcase my results in HH:MM mode for maximum, average, minimum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Below results currently I am getting by using above query.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uagraw01_0-1721996620345.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31920i75C83A008DF314C2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uagraw01_0-1721996620345.png" alt="uagraw01_0-1721996620345.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 14:02:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694400#M12570</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-07-26T14:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Splunk query</title>
      <link>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694405#M12571</link>
      <description>&lt;LI-CODE lang="markup"&gt;| foreach Maximum Average Minimum [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;_duration=tostring(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,"duration") ]&lt;/LI-CODE&gt;&lt;P&gt;However, as I said before, you can't use these duration fields on a chart as they are strings not numbers&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 12:43:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694405#M12571</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-26T12:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Splunk query</title>
      <link>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694409#M12572</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Any alternative to showcase this in line chart ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uagraw01_1-1721999697156.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31924i6908AA718FF7C180/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uagraw01_1-1721999697156.png" alt="uagraw01_1-1721999697156.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 13:15:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694409#M12572</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-07-26T13:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Splunk query</title>
      <link>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694411#M12573</link>
      <description>&lt;P&gt;Wouldn't you think if I knew of another way I would have mentioned it?&lt;/P&gt;&lt;P&gt;&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;&lt;U&gt;You can't use strings for values in charts.&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 13:37:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694411#M12573</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-26T13:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Splunk query</title>
      <link>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694412#M12574</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Thanks for your help and suggestion.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 13:46:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Issue-with-Splunk-query/m-p/694412#M12574</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-07-26T13:46:31Z</dc:date>
    </item>
  </channel>
</rss>

