<?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 Transpose and Timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363879#M107420</link>
    <description>&lt;P&gt;Hi, I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;I've put together the following query which works but I'm having trouble adding the 'timechart' command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (wso2_wmf(RequestCompleted)) OR (`auth_wmf(RequestReceived)`)
  | spath output=afin input=detail.responseMessage path=affinityGroup
  | eval requestid=coalesce('request.tags.X-Request-ID', 'tags.X-Request-ID')
  | stats values(afin) as afin, values(request.detail.apiContext) as api by requestid
  | search (api="benefits" OR api="employment" OR api="income")
  | stats count by afin, api
  | transpose 0
 | fields - column
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like the time to be show in the far left column, but as soon as I incorporate the 'timechart' and 'transpose' commands, the format of the table is thrown out.&lt;/P&gt;

&lt;P&gt;i just wondered whether someone may be able to look at this please and offer some guidance on how I can incorporate the 'timechart' with a span of 1d.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Thu, 26 Apr 2018 12:25:31 GMT</pubDate>
    <dc:creator>IRHM73</dc:creator>
    <dc:date>2018-04-26T12:25:31Z</dc:date>
    <item>
      <title>Transpose and Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363879#M107420</link>
      <description>&lt;P&gt;Hi, I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;I've put together the following query which works but I'm having trouble adding the 'timechart' command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (wso2_wmf(RequestCompleted)) OR (`auth_wmf(RequestReceived)`)
  | spath output=afin input=detail.responseMessage path=affinityGroup
  | eval requestid=coalesce('request.tags.X-Request-ID', 'tags.X-Request-ID')
  | stats values(afin) as afin, values(request.detail.apiContext) as api by requestid
  | search (api="benefits" OR api="employment" OR api="income")
  | stats count by afin, api
  | transpose 0
 | fields - column
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like the time to be show in the far left column, but as soon as I incorporate the 'timechart' and 'transpose' commands, the format of the table is thrown out.&lt;/P&gt;

&lt;P&gt;i just wondered whether someone may be able to look at this please and offer some guidance on how I can incorporate the 'timechart' with a span of 1d.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 12:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363879#M107420</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2018-04-26T12:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363880#M107421</link>
      <description>&lt;P&gt;When you use &lt;CODE&gt;transpose&lt;/CODE&gt; your turning your &lt;CODE&gt;_time&lt;/CODE&gt; column into a row and &lt;CODE&gt;timechart&lt;/CODE&gt; is attempting to use time on the x-axis and it can't. I also noticed your query is using &lt;CODE&gt;stats&lt;/CODE&gt; and not passing time. You need to add your &lt;CODE&gt;_time&lt;/CODE&gt; to the &lt;CODE&gt;stats&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Also, you can keep your &lt;CODE&gt;stats&lt;/CODE&gt;, but you would need to add &lt;CODE&gt;| bin _time span=1d&lt;/CODE&gt; before the &lt;CODE&gt;stats&lt;/CODE&gt; command.&lt;/P&gt;

&lt;P&gt;Why are you using &lt;CODE&gt;transpose&lt;/CODE&gt; anyways?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 12:40:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363880#M107421</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-04-26T12:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363881#M107422</link>
      <description>&lt;P&gt;Hi @skoelpin, thank you for replying. I can certainly make the changes you suggest but the reason I'm using transpose, is so I can change the row values into column headers.&lt;/P&gt;

&lt;P&gt;I'm not sure whether there is a more efficient way?&lt;/P&gt;

&lt;P&gt;Kind Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 12:54:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363881#M107422</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2018-04-26T12:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363882#M107423</link>
      <description>&lt;P&gt;isn't your stats command dropping _time since it's not included? &lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 12:55:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363882#M107423</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-04-26T12:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363883#M107424</link>
      <description>&lt;P&gt;I've updated the query for you. After running this, what's your desired result?  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   (wso2_wmf(RequestCompleted)) OR (`auth_wmf(RequestReceived)`)
       | spath output=afin input=detail.responseMessage path=affinityGroup
       | eval requestid=coalesce('request.tags.X-Request-ID', 'tags.X-Request-ID')
       | bin _time span=1d
       | stats values(afin) as afin, values(request.detail.apiContext) as api by _time, requestid
       | search (api="benefits" OR api="employment" OR api="income")
       | stats count by _time, afin, api
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Apr 2018 12:59:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363883#M107424</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-04-26T12:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363884#M107425</link>
      <description>&lt;P&gt;Hi @skoelpin, thank you for coming back to me with this.&lt;/P&gt;

&lt;P&gt;The table does produce the date along the data, but I'm not sure whether you picked up on my last comment about the transpose.&lt;/P&gt;

&lt;P&gt;The api field value need to be the column values, and as soon as I add the transpose command the time is also transposed but I still need the _time as a row value. This is where I have the issue.&lt;/P&gt;

&lt;P&gt;Kind Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 06:24:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363884#M107425</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2018-04-27T06:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and Timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363885#M107426</link>
      <description>&lt;P&gt;Hi @kmaron, yes thank you for this.&lt;/P&gt;

&lt;P&gt;I've now included the _time but I have issues over the Transpose.&lt;/P&gt;

&lt;P&gt;Kind Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 06:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transpose-and-Timechart/m-p/363885#M107426</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2018-04-27T06:25:31Z</dc:date>
    </item>
  </channel>
</rss>

