<?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: How to convert Hourly Stats into daily? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Hourly-Stats-into-daily/m-p/339062#M100532</link>
    <description>&lt;P&gt;try combining your searches and using timechart instead of just chart. there might be a way to get rid of that last join, but it's going to take some thinking.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=idx sourcetype=order "successfully created order" "[paymentinfo]" ) OR (index=tomcat sourcetype=order "successfully created order" ("[StoreCardPaymentInfo]" OR "[GiftCard]") ) 
|eval PayPal=if(index=idx,1,null())
|eval StoreCard=if(like(_raw,"%StoreCardPaymentInfo%"),1,null())
|eval GiftCard=if(like(_raw,"%GiftCard%"),1,null())
|timechart span=1d count(PayPal) as PayPal count(StoreCard) as StoreCard count(GiftCard) as GiftCard
| join type=left _time 
    [ search index=tomcat sourcetype=order "successfully created order" Card_type!=NULL 
    | timechart count(Card_type) by Card_type limit=0 span=1d 
    | rename amex as Amex, maestro as Maestro, master as Mastercard, visa as VISA, diners as Diners] 
| fillnull
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 30 Jan 2018 13:10:39 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2018-01-30T13:10:39Z</dc:date>
    <item>
      <title>How to convert Hourly Stats into daily?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Hourly-Stats-into-daily/m-p/339061#M100531</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I am a Splunk User and been using it for a few months now,&lt;/P&gt;

&lt;P&gt;I have created a query which creates a table of count of orders of different payment types.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx sourcetype=order "successfully created order" "[paymentinfo]" | chart count AS PayPal by _time span=1h | join type=outer _time [search index=tomcat sourcetype=order "successfully created order" "[StoreCardPaymentInfo]" | chart count AS StoreCard by _time span=1h] | join type=outer _time [search index=tomcat sourcetype=order "successfully created order" "[GiftCard]" | chart count AS GiftCard by _time span=1h ] | join type=outer _time [search index=tomcat sourcetype=order "successfully created order"  Card_type!=NULL | timechart count(Card_type) by Card_type limit=0 span=1h | rename amex as Amex, maestro as Maestro, master as Mastercard, visa as VISA, diners as Diners] | fillnull 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It currently lists the hourly report of the orders&lt;/P&gt;

&lt;P&gt;If I want to make that report daily instead of hourly, I added &lt;CODE&gt;| eval Date=strftime(_time, "%d-%m-%Y") | fields- _time | table Date VISA PayPal Mastercard Maestro GiftCard StoreCard Amex&lt;/CODE&gt; and replaced time span by 1d from 1h, but the issue here is that it doesnt reflect the total count throughout the day, it only shows the total count for the first payment method i.e. PayPal which is the first in the multiple joins so I am guessing it has something to do with the joins&lt;/P&gt;

&lt;P&gt;And also the query I have written seems to work fine, is there anything I can change in it or improve?&lt;BR /&gt;
Please help!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 10:50:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Hourly-Stats-into-daily/m-p/339061#M100531</guid>
      <dc:creator>varunghai</dc:creator>
      <dc:date>2018-01-30T10:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Hourly Stats into daily?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Hourly-Stats-into-daily/m-p/339062#M100532</link>
      <description>&lt;P&gt;try combining your searches and using timechart instead of just chart. there might be a way to get rid of that last join, but it's going to take some thinking.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=idx sourcetype=order "successfully created order" "[paymentinfo]" ) OR (index=tomcat sourcetype=order "successfully created order" ("[StoreCardPaymentInfo]" OR "[GiftCard]") ) 
|eval PayPal=if(index=idx,1,null())
|eval StoreCard=if(like(_raw,"%StoreCardPaymentInfo%"),1,null())
|eval GiftCard=if(like(_raw,"%GiftCard%"),1,null())
|timechart span=1d count(PayPal) as PayPal count(StoreCard) as StoreCard count(GiftCard) as GiftCard
| join type=left _time 
    [ search index=tomcat sourcetype=order "successfully created order" Card_type!=NULL 
    | timechart count(Card_type) by Card_type limit=0 span=1d 
    | rename amex as Amex, maestro as Maestro, master as Mastercard, visa as VISA, diners as Diners] 
| fillnull
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jan 2018 13:10:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Hourly-Stats-into-daily/m-p/339062#M100532</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-01-30T13:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Hourly Stats into daily?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Hourly-Stats-into-daily/m-p/339063#M100533</link>
      <description>&lt;P&gt;khool, thanks! it helped i will try to get rid of the join  and make it a decent query &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 11:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Hourly-Stats-into-daily/m-p/339063#M100533</guid>
      <dc:creator>varunghai</dc:creator>
      <dc:date>2018-01-31T11:30:34Z</dc:date>
    </item>
  </channel>
</rss>

