<?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 How to combine two charts? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-charts/m-p/202936#M58923</link>
    <description>&lt;P&gt;I have made two charts based on two different search queries.  One is a column chart and another one is a line chart.But I would like to have these 2 charts(column chart and line graph) in the same chart. I want them to be as they are but in a single chart instead of two different charts. The line graph may overlap on the columnar chart. &lt;BR /&gt;
Here are the queries of those two charts:&lt;/P&gt;

&lt;P&gt;*Query 1:  "index=fin_mng | convert num("Income from Operations") as income_oper |  convert num("Other Income") as other_income  |  convert num("Other Income _ Miscellaneous Income") as misc_income|fillnull value=0|eval TotalIncome= income_oper + other_income + misc_income|chart sum(TotalIncome) as "Total Expenses" over source by Company_name |replace 2011-2012.csv with 2011-2012 2012-2013.csv with 2012-2013 2013-2014.csv with 2013-2014 2014-2015.csv with 2014-2015 2015-2016.csv with 2015-2016 | rename source as Year"&lt;/P&gt;

&lt;P&gt;Query 2: "index=fin_mng |convert num("Other Expenses") as Other_Expenses |  convert num("Travelling Expenses") as Travelling_Expenses  |  convert num("Employee Benefit Expenses") as Employee_Benefit_Expenses|convert num("Depreciation and Amortisation expense") as Depreciation_Amortisation_expense|convert num("Expenditure") as Expenditure| fillnull value=0|eval TotalExpenses= (Other_Expenses + Travelling_Expenses  + Employee_Benefit_Expenses+Depreciation_Amortisation_expense+Expenditure)*(-1)| chart sum(TotalExpenses) as "Total Expenses" over source by Company_name |replace 2011-2012.csv with 2011-2012 2012-2013.csv with 2012-2013 2013-2014.csv with 2013-2014 2014-2015.csv with 2014-2015 2015-2016.csv with 2015-2016 | rename source as Year"&lt;/P&gt;

&lt;P&gt;I have attached the screenshot of those two charts I have made for reference. &lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/159219-chart1.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/159221-chart2.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:03:03 GMT</pubDate>
    <dc:creator>gokool2u</dc:creator>
    <dc:date>2020-09-29T11:03:03Z</dc:date>
    <item>
      <title>How to combine two charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-charts/m-p/202936#M58923</link>
      <description>&lt;P&gt;I have made two charts based on two different search queries.  One is a column chart and another one is a line chart.But I would like to have these 2 charts(column chart and line graph) in the same chart. I want them to be as they are but in a single chart instead of two different charts. The line graph may overlap on the columnar chart. &lt;BR /&gt;
Here are the queries of those two charts:&lt;/P&gt;

&lt;P&gt;*Query 1:  "index=fin_mng | convert num("Income from Operations") as income_oper |  convert num("Other Income") as other_income  |  convert num("Other Income _ Miscellaneous Income") as misc_income|fillnull value=0|eval TotalIncome= income_oper + other_income + misc_income|chart sum(TotalIncome) as "Total Expenses" over source by Company_name |replace 2011-2012.csv with 2011-2012 2012-2013.csv with 2012-2013 2013-2014.csv with 2013-2014 2014-2015.csv with 2014-2015 2015-2016.csv with 2015-2016 | rename source as Year"&lt;/P&gt;

&lt;P&gt;Query 2: "index=fin_mng |convert num("Other Expenses") as Other_Expenses |  convert num("Travelling Expenses") as Travelling_Expenses  |  convert num("Employee Benefit Expenses") as Employee_Benefit_Expenses|convert num("Depreciation and Amortisation expense") as Depreciation_Amortisation_expense|convert num("Expenditure") as Expenditure| fillnull value=0|eval TotalExpenses= (Other_Expenses + Travelling_Expenses  + Employee_Benefit_Expenses+Depreciation_Amortisation_expense+Expenditure)*(-1)| chart sum(TotalExpenses) as "Total Expenses" over source by Company_name |replace 2011-2012.csv with 2011-2012 2012-2013.csv with 2012-2013 2013-2014.csv with 2013-2014 2014-2015.csv with 2014-2015 2015-2016.csv with 2015-2016 | rename source as Year"&lt;/P&gt;

&lt;P&gt;I have attached the screenshot of those two charts I have made for reference. &lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/159219-chart1.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/159221-chart2.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:03:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-charts/m-p/202936#M58923</guid>
      <dc:creator>gokool2u</dc:creator>
      <dc:date>2020-09-29T11:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-charts/m-p/202937#M58924</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=fin_mng | convert num("Income from Operations") as income_oper | convert num("Other Income") as other_income | convert num("Other Income _ Miscellaneous Income") as misc_income|fillnull value=0|eval TotalIncome= income_oper + other_income + misc_income|chart sum(TotalIncome) as "Income" sum(TotalExpenses) as "Expenses" over source by Company_name |replace 2011-2012.csv with 2011-2012 2012-2013.csv with 2012-2013 2013-2014.csv with 2013-2014 2014-2015.csv with 2014-2015 2015-2016.csv with 2015-2016 | rename source as Year
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once you have the results add the "&amp;lt;&amp;gt;:Expenses" field as overlay fields. Here's more on how you can do that&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/Viz/Chartcontrols#Chart_overlay_example_.28dual_axis.29"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.3/Viz/Chartcontrols#Chart_overlay_example_.28dual_axis.29&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 12:41:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-charts/m-p/202937#M58924</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-21T12:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-charts/m-p/202938#M58925</link>
      <description>&lt;P&gt;Thank you so much Sundaresh. It worked like a charm... &lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2016 09:57:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-charts/m-p/202938#M58925</guid>
      <dc:creator>gokool2u</dc:creator>
      <dc:date>2016-09-22T09:57:43Z</dc:date>
    </item>
  </channel>
</rss>

