<?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: combine chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636628#M221097</link>
    <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Most things are possible. Let's try to figure what we are trying to achieve.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"| eval Created=substr(Created, 1, 7)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this generating a state i.e. "created" or is this a user_id or similar with multiple combinations of values?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"| eval a=if(State="Closed",1,0)"&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you want to count the number of occurrences something was created&amp;nbsp; and closed?&amp;nbsp;&lt;/P&gt;&lt;P&gt;maybe&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="a.csv" OR source="b.csv" OR source="c.csv" Company="x"
| eval created_by=substr(Created, 1, 7)
| eval is_closed=if(State="Closed",1,0)
| eval user_source = created_by.":".source
| chart sum(is_closed), count by user_source&lt;/LI-CODE&gt;&lt;P&gt;OR&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="a.csv" OR source="b.csv" OR source="c.csv" Company="x"
| eval created_by=substr(Created, 1, 7)
| eval is_closed=if(State="Closed",1,0)
| eval user_source = created_by.":".source
| chart sum(is_closed), count by created_by, source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Seb&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2023 05:55:11 GMT</pubDate>
    <dc:creator>srauhala_splunk</dc:creator>
    <dc:date>2023-03-30T05:55:11Z</dc:date>
    <item>
      <title>How to combine chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636480#M221042</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am trying to combine the results from 2 different search queries into a single chart.Is there a way to do this?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FIRST search:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;source="a.csv" OR source="b.csv" OR source="c.csv" Company="x" 
| eval Created=substr(Created, 1, 7) 
| eval a=if(State="Closed",1,0)
| chart sum(a) AS closed_event by Created&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SECOND search:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;source="a.csv" OR source="b.csv" OR source="c.csv" Company="x" 
| eval Created=substr(Created, 1, 7)
| chart count by Created,source&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I want the first search as a line chart and the second search as a column chart，combining them.&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 16:05:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636480#M221042</guid>
      <dc:creator>Kaiyue</dc:creator>
      <dc:date>2023-03-29T16:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: combine chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636489#M221046</link>
      <description>&lt;P&gt;If the two searches have different groupby lists, this is impossible. &amp;nbsp;Just try to draw a mockup and illustrate how the output will look like.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 09:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636489#M221046</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-03-29T09:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: combine chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636492#M221047</link>
      <description>&lt;P&gt;Thank you very much for your answer, if there is a way to implement it in the dashboard&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 09:24:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636492#M221047</guid>
      <dc:creator>Kaiyue</dc:creator>
      <dc:date>2023-03-29T09:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: combine chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636493#M221048</link>
      <description>&lt;P&gt;Maybe something like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="a.csv" OR source="b.csv" OR source="c.csv" Company="x"
```Expection State is either "Created OR Closed" ```
| eval state_source = State.":".source
| chart count by state_source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Seb&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 09:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636493#M221048</guid>
      <dc:creator>srauhala_splunk</dc:creator>
      <dc:date>2023-03-29T09:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: combine chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636494#M221049</link>
      <description>Sorry it didn't work, thanks for your answer</description>
      <pubDate>Wed, 29 Mar 2023 09:35:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636494#M221049</guid>
      <dc:creator>Kaiyue</dc:creator>
      <dc:date>2023-03-29T09:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: combine chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636608#M221090</link>
      <description>&lt;P&gt;If I change the second search like this，is it possible to achieve?&lt;/P&gt;&lt;P&gt;source="a.csv" OR source="b.csv" OR source="c.csv" Company="x"&lt;/P&gt;&lt;P&gt;| eval Created=substr(Created, 1, 7)&lt;/P&gt;&lt;P&gt;| count(eval(source="a.csv")) AS A count(eval(source="b.csv")) AS B count(eval(source="c.csv")) AS C by Created&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 01:20:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636608#M221090</guid>
      <dc:creator>Kaiyue</dc:creator>
      <dc:date>2023-03-30T01:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: combine chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636628#M221097</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Most things are possible. Let's try to figure what we are trying to achieve.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"| eval Created=substr(Created, 1, 7)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this generating a state i.e. "created" or is this a user_id or similar with multiple combinations of values?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"| eval a=if(State="Closed",1,0)"&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you want to count the number of occurrences something was created&amp;nbsp; and closed?&amp;nbsp;&lt;/P&gt;&lt;P&gt;maybe&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="a.csv" OR source="b.csv" OR source="c.csv" Company="x"
| eval created_by=substr(Created, 1, 7)
| eval is_closed=if(State="Closed",1,0)
| eval user_source = created_by.":".source
| chart sum(is_closed), count by user_source&lt;/LI-CODE&gt;&lt;P&gt;OR&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="a.csv" OR source="b.csv" OR source="c.csv" Company="x"
| eval created_by=substr(Created, 1, 7)
| eval is_closed=if(State="Closed",1,0)
| eval user_source = created_by.":".source
| chart sum(is_closed), count by created_by, source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Seb&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 05:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636628#M221097</guid>
      <dc:creator>srauhala_splunk</dc:creator>
      <dc:date>2023-03-30T05:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: combine chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636631#M221098</link>
      <description>&lt;P&gt;If you have the same groupby, yes. &amp;nbsp;The name of the game is overlay. &amp;nbsp;In fact, I gave an example in my .conf22 talk.&lt;/P&gt;&lt;P&gt;To help visualize, this is the effect you wanted:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Line chart and column chart" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24626iB5B3C74B53381490/image-size/large?v=v2&amp;amp;px=999" role="button" title="overlay-separate-y.png" alt="Line chart and column chart" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Line chart and column chart&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To get this, your search would look like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="a.csv" OR source="b.csv" OR source="c.csv" Company="x" 
| eval Created=substr(Created, 1, 7) 
| eval a=if(State="Closed",1,0)
| chart sum(a) AS closed_event count(eval(source="a.csv")) AS A count(eval(source="b.csv")) AS B count(eval(source="c.csv")) AS C by Created&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, open Visualization, select column chart as your base type. &amp;nbsp;Then, click Format -&amp;gt; Chart Overlay. &amp;nbsp;Select "closed_event" into Overlay. &amp;nbsp;if the numbers between closed_event and A, B, C is large, the chart will benefit from "View as Axis", which create a separately scaled Y-axis on the right side as illustrated above.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chart-overlay.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24627iC83FA5ED6E648369/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chart-overlay.png" alt="chart-overlay.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 06:05:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-chart/m-p/636631#M221098</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-03-30T06:05:33Z</dc:date>
    </item>
  </channel>
</rss>

