<?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 build multiple timecharts in dashboard from one field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/669311#M229560</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;for your inputs.&lt;/P&gt;&lt;P&gt;I was able to build my solution using it as below: -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=custom_index
earliest=-4w@w latest=@d
|search
[
|inputlookup append=true table1.csv
|where relative_time(now(),"-1d@d")
|dedup fieldA
|where fieldB&amp;lt;fieldC
|fields + fieldA
|fields - _time
]
|bin span=1d _time
|stats sum(xxx) AS xxx BY fieldA _time
|eventstats median(xxx) AS median_xxx BY fieldA&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 21 Nov 2023 11:15:40 GMT</pubDate>
    <dc:creator>Taruchit</dc:creator>
    <dc:date>2023-11-21T11:15:40Z</dc:date>
    <item>
      <title>How to build multiple timecharts in dashboard from one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/668855#M229426</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have a lookup file with multiple columns: fieldA, fieldB, fieldC.&lt;/P&gt;&lt;P&gt;I need to publish timechart for each value under fieldA based on search conditions of fieldB and fieldC.&lt;/P&gt;&lt;P&gt;Thus, I want your guidance to understand how to build multiple timecharts from same field by reading the required field values from lookup file.&lt;/P&gt;&lt;P&gt;Any inputs and information would be very helpful.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Taruchit&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 12:01:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/668855#M229426</guid>
      <dc:creator>Taruchit</dc:creator>
      <dc:date>2023-11-16T12:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to build multiple timecharts in dashboard from one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/668857#M229427</link>
      <description>&lt;P&gt;| used the below approach so far it seemed to have worked. But if I want to compute statistics like mean, median, that does not seem to work.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=custom_index
earliest=-4w@w latest=@d
|search
[
|inputlookup append=true table1.csv
|where relative_time(now(),"-1d@d")
|dedup fieldA
|where fieldB&amp;lt;fieldC
|fields + fieldA
|fields - _time
]
|timechart span=1d sum(xxx) AS xxx BY fieldA&lt;/LI-CODE&gt;&lt;P&gt;To visualize each timechart separately, I used Trellis option in Visualization.&lt;/P&gt;&lt;P&gt;Thus, if you can help if there is more better method to achieve the result it would be very helpful.&lt;/P&gt;&lt;P&gt;And if you could help on computing statistical values such as mean, median in each timechart, that would be very helpful.&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 12:19:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/668857#M229427</guid>
      <dc:creator>Taruchit</dc:creator>
      <dc:date>2023-11-16T12:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to build multiple timecharts in dashboard from one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/668859#M229428</link>
      <description>&lt;P&gt;More words please.&lt;/P&gt;&lt;P&gt;Your problem description is relatively vague and your search only adds to confusion I must say.&lt;/P&gt;&lt;P&gt;All I understand is that you have some lookup and some data in the index. I have no idea what is the relation between the indexed events and the lookup and what you want to get as the result.&lt;/P&gt;&lt;P&gt;Generally, you can't create a single timechart with multiple aggregations. You could bin your data and then simply do stats over _time to get multiple "timecharted" functions but then you'd have to aggregate them somehow.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 12:31:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/668859#M229428</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-11-16T12:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to build multiple timecharts in dashboard from one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/668861#M229430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I have an index with multiple fields. I need to plot the timechart for values based on fieldA.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I need to pick the selected values based on a search condition from lookup file for fieldA and plot their timechart using the data fetched from the index.&lt;/P&gt;&lt;P&gt;Please share if the above explains the case or if you need any more details.&lt;/P&gt;&lt;P&gt;I was able to build multiple timecharts using the SPL shared, however, I need to add statistical value like median or mean in each timechart and I am looking for help on the same.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 12:39:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/668861#M229430</guid>
      <dc:creator>Taruchit</dc:creator>
      <dc:date>2023-11-16T12:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to build multiple timecharts in dashboard from one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/668865#M229433</link>
      <description>&lt;P&gt;It would be best if you provided us with some mockup data and expected result.&lt;/P&gt;&lt;P&gt;Selecting based on values from the lookup requires a subsearch indeed, similarily to what you already did (but you don't need to specify append=t in case of a simple inputlookup; you need it only if you use that command later in the pipeline to append the results from the lookup to the earlier results).&lt;/P&gt;&lt;P&gt;Again - you can't use two separate aggregations in a single timechart command.&lt;/P&gt;&lt;P&gt;So you can't do, for example:&lt;/P&gt;&lt;PRE&gt;timechart span=1h sum(A) avg(A) &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;You need to do two separate timechart commands.&lt;/P&gt;&lt;P&gt;Or - as I said, do&lt;/P&gt;&lt;PRE&gt;| bin _time span=1h&lt;BR /&gt;| stats sum(A) as sum avg(a) as avg by _time&lt;/PRE&gt;&lt;P&gt;If you want to combine them now to a single time-based table you'd need to do something like&lt;/P&gt;&lt;PRE&gt;| stats values(sum) as sum values(avg) as (avg) by _time&lt;/PRE&gt;&lt;P&gt;It gets tricky if you try to split that by additional field.&lt;/P&gt;&lt;P&gt;Depending on your desired outcome you might want to either dynamically create fields or use some xyseries/untable tricks.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 12:50:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/668865#M229433</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-11-16T12:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to build multiple timecharts in dashboard from one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/669311#M229560</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;for your inputs.&lt;/P&gt;&lt;P&gt;I was able to build my solution using it as below: -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=custom_index
earliest=-4w@w latest=@d
|search
[
|inputlookup append=true table1.csv
|where relative_time(now(),"-1d@d")
|dedup fieldA
|where fieldB&amp;lt;fieldC
|fields + fieldA
|fields - _time
]
|bin span=1d _time
|stats sum(xxx) AS xxx BY fieldA _time
|eventstats median(xxx) AS median_xxx BY fieldA&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 21 Nov 2023 11:15:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-multiple-timecharts-in-dashboard-from-one-field/m-p/669311#M229560</guid>
      <dc:creator>Taruchit</dc:creator>
      <dc:date>2023-11-21T11:15:40Z</dc:date>
    </item>
  </channel>
</rss>

