<?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: Line graph using csv in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580839#M11142</link>
    <description>&lt;P&gt;Thanks, this worked! Appreciate your efforts &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jan 2022 18:06:29 GMT</pubDate>
    <dc:creator>sandyjov1</dc:creator>
    <dc:date>2022-01-12T18:06:29Z</dc:date>
    <item>
      <title>Line graph using csv</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580667#M11117</link>
      <description>&lt;P&gt;I am attempting to make a line graph with information from a csv w/ info from the past year.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="20%"&gt;Nov 2020&lt;/TD&gt;&lt;TD width="20%"&gt;December 2020&lt;/TD&gt;&lt;TD width="20%"&gt;January 2021&lt;/TD&gt;&lt;TD width="20%"&gt;February 2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%"&gt;Events&lt;/TD&gt;&lt;TD width="20%"&gt;19&lt;/TD&gt;&lt;TD width="20%"&gt;9&lt;/TD&gt;&lt;TD width="20%"&gt;5&lt;/TD&gt;&lt;TD width="20%"&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%"&gt;Cleared&lt;/TD&gt;&lt;TD width="20%"&gt;3&lt;/TD&gt;&lt;TD width="20%"&gt;1&lt;/TD&gt;&lt;TD width="20%"&gt;1&lt;/TD&gt;&lt;TD width="20%"&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%"&gt;Incidents&lt;/TD&gt;&lt;TD width="20%"&gt;3&lt;/TD&gt;&lt;TD width="20%"&gt;1&lt;/TD&gt;&lt;TD width="20%"&gt;1&lt;/TD&gt;&lt;TD width="20%"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;False Positives&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need each category to have its own line on&amp;nbsp; a line graph. The Months would be on x axis (nov20-nov21). It doesn't seem complicated, but cant seem to get the results .&amp;nbsp; Any help would be appreciated. Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 18:20:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580667#M11117</guid>
      <dc:creator>sandyjov1</dc:creator>
      <dc:date>2022-01-11T18:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Line graph using csv</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580673#M11119</link>
      <description>&lt;P&gt;You need to use transpose, then get rid of some added fields and sort the dates&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="Category,November 2020,December 2020,January 2021,February 2021
Events,19,9,5,7
Cleared,3,1,1,7
Incidents,3,1,1,0
False Positives,16,8,4,7"
| multikv forceheader=1
| fields - linecount _raw _time
``` the lines above set up some sample data ```
| transpose 0 header_field=Category column_name=Date
| eval Date=strptime(Date."-01","%B_%Y-%d")
| where isnotnull(Date)
| sort 0 Date
| fieldformat Date=strftime(Date,"%B %Y")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 Jan 2022 18:49:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580673#M11119</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-11T18:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Line graph using csv</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580679#M11120</link>
      <description>&lt;P&gt;Thank you for help!&lt;BR /&gt;Is there a better way for me to setup my csv, so that I wouldn't need to transpose?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 19:27:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580679#M11120</guid>
      <dc:creator>sandyjov1</dc:creator>
      <dc:date>2022-01-11T19:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Line graph using csv</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580694#M11121</link>
      <description>&lt;P&gt;Transpose the CSV, so the rows are months and the columns are categories. That is how the timechart command will work to produce data for a time based chart where date is on the X axis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 21:50:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580694#M11121</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-01-11T21:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Line graph using csv</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580695#M11122</link>
      <description>&lt;P&gt;Put the dates in the first column and the categories across the top - it depends on how you set it up in the first place&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 21:52:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580695#M11122</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-11T21:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Line graph using csv</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580696#M11123</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp;&lt;BR /&gt;what would the timechart query look like if I fixed my csv that way?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 22:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580696#M11123</guid>
      <dc:creator>sandyjov1</dc:creator>
      <dc:date>2022-01-11T22:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Line graph using csv</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580714#M11126</link>
      <description>&lt;P&gt;If your CSV looks like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bowesmana_0-1641960560852.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17530i7EE58067088A776E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bowesmana_0-1641960560852.png" alt="bowesmana_0-1641960560852.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and it's in a file called events.csv, then all you need is this query&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup events.csv
| eval Date=strptime(Date."-01","%B %Y-%d")
| sort 0 Date
| table Date *&lt;/LI-CODE&gt;&lt;P&gt;You don't need to use the timechart as your data is already in the format a timechart would create&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;'s solution is perfectly good for your data as it stands, so unless it makes sense for you to change the data, just use his solution. If you are going to use the data in many places, just create a macro that would do all the initial load and transpose so your query just uses the macro to keep it clean.&amp;nbsp;If you change your data format you just change the macro and everything will continue to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 04:14:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580714#M11126</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-01-12T04:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Line graph using csv</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580838#M11141</link>
      <description>&lt;P&gt;Appreciate your help!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 18:05:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580838#M11141</guid>
      <dc:creator>sandyjov1</dc:creator>
      <dc:date>2022-01-12T18:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Line graph using csv</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580839#M11142</link>
      <description>&lt;P&gt;Thanks, this worked! Appreciate your efforts &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 18:06:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Line-graph-using-csv/m-p/580839#M11142</guid>
      <dc:creator>sandyjov1</dc:creator>
      <dc:date>2022-01-12T18:06:29Z</dc:date>
    </item>
  </channel>
</rss>

