<?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: Calculation in Dashboard in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Calculation-in-Dashboard/m-p/357108#M41735</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw = "1001 abc done on 2018-04-21 00:45:38,
1100 agc done on 2018-04-21 00:55:30,
1200 ybc done on 2018-04-21 01:05:39" 
| eval raw = split(raw, ",") 
| mvexpand raw
| rename raw AS _raw

| rename COMMENT AS "Everything above generates sample event data; everything below is your solution"

| rex "(?&amp;lt;value&amp;gt;\d+)\s+(?&amp;lt;which&amp;gt;\S+)\s+\S+\s+on\s+(?&amp;lt;_time&amp;gt;[^,]+)"
| eval _time = strptime(_time, "%Y-%m-%d %H:%M:%S")
| sort 0 - _time
| reverse
| delta value
| reverse
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 24 Apr 2018 23:04:54 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2018-04-24T23:04:54Z</dc:date>
    <item>
      <title>Calculation in Dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Calculation-in-Dashboard/m-p/357106#M41733</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;

&lt;P&gt;I am completely new to splunk,. I have a Dashboard requirement where I need to display the difference of the first column of numbers every 15 minutes. The log is updating every 10-15 minutes in real time.  For ex: first record in the graph should be 99( 1100-1001) &lt;/P&gt;

&lt;P&gt;2018-04-21 00:00:00  INFO    Switching to next trail file due to EOF&lt;BR /&gt;
1001 abc done on 2018-04-21 00:45:38&lt;BR /&gt;
1100 agc done on 2018-04-21 00:55:30&lt;BR /&gt;
1200 ybc done on 2018-04-21 01:05:39&lt;BR /&gt;
...................................&lt;BR /&gt;
.....................................&lt;BR /&gt;
2400 bcd done on 2018-04-21 10:40:38&lt;/P&gt;

&lt;P&gt;Please assist in how I can achieve this.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Naomi&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 01:18:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Calculation-in-Dashboard/m-p/357106#M41733</guid>
      <dc:creator>naomibn</dc:creator>
      <dc:date>2018-04-24T01:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation in Dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Calculation-in-Dashboard/m-p/357107#M41734</link>
      <description>&lt;P&gt;Hope this search satisfies your requirement&lt;/P&gt;

&lt;P&gt;|makeresults | eval event  = "1001 abc done on 2018-04-21 00:45:38,&lt;BR /&gt;
1100 agc done on 2018-04-21 00:55:30,&lt;BR /&gt;
1200 ybc done on 2018-04-21 01:05:39" |eval event = split(event, ",")|mvexpand event| rex field=event "(?\d+)\s+(?P\w+)\s+(?P\w+)" |delta first as firstcolumndiff&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 03:54:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Calculation-in-Dashboard/m-p/357107#M41734</guid>
      <dc:creator>ssadanala1</dc:creator>
      <dc:date>2018-04-24T03:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation in Dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Calculation-in-Dashboard/m-p/357108#M41735</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw = "1001 abc done on 2018-04-21 00:45:38,
1100 agc done on 2018-04-21 00:55:30,
1200 ybc done on 2018-04-21 01:05:39" 
| eval raw = split(raw, ",") 
| mvexpand raw
| rename raw AS _raw

| rename COMMENT AS "Everything above generates sample event data; everything below is your solution"

| rex "(?&amp;lt;value&amp;gt;\d+)\s+(?&amp;lt;which&amp;gt;\S+)\s+\S+\s+on\s+(?&amp;lt;_time&amp;gt;[^,]+)"
| eval _time = strptime(_time, "%Y-%m-%d %H:%M:%S")
| sort 0 - _time
| reverse
| delta value
| reverse
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Apr 2018 23:04:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Calculation-in-Dashboard/m-p/357108#M41735</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-04-24T23:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation in Dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Calculation-in-Dashboard/m-p/357109#M41736</link>
      <description>&lt;P&gt;I got it working. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 06:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Calculation-in-Dashboard/m-p/357109#M41736</guid>
      <dc:creator>naomibn</dc:creator>
      <dc:date>2018-07-27T06:44:14Z</dc:date>
    </item>
  </channel>
</rss>

