<?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 Chart or timechart by multiple values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Chart-or-timechart-by-multiple-values/m-p/549256#M155838</link>
    <description>&lt;P&gt;I have a chart that I can split by myDate or env, but I cannot get it to split by both myDate and env for example I need to see how many urgency events have taken place on a given myDate by each of the env (environments).&lt;/P&gt;&lt;P&gt;I have used multiple versions of splitting the code and just cannot get this right - any help will be great, this is related to Splunk ES.&lt;/P&gt;&lt;P&gt;`notable`&lt;BR /&gt;| eval env=coalesce(src_bunit, dvc_bunit, dest_bunit)&lt;BR /&gt;| eval env=upper(env)&lt;BR /&gt;| fillnull value="Unknown" env&lt;BR /&gt;| search NOT `suppression` AND env=*&lt;BR /&gt;| eval myDate=strftime(_time, "%Y-%m-%d")&lt;BR /&gt;| chart count by env urgency&lt;BR /&gt;| table myDate env critical high medium low informational&lt;BR /&gt;| fillnull critical high medium low informational&lt;BR /&gt;| rename env AS Environment, critical AS Critical, high AS High, medium AS Medium, low AS Low, informational AS Informational&lt;BR /&gt;| addtotals col=true labelfield=Environment label="Total(s)" row=true&lt;/P&gt;</description>
    <pubDate>Sun, 25 Apr 2021 07:41:49 GMT</pubDate>
    <dc:creator>sherpedz</dc:creator>
    <dc:date>2021-04-25T07:41:49Z</dc:date>
    <item>
      <title>Chart or timechart by multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-or-timechart-by-multiple-values/m-p/549256#M155838</link>
      <description>&lt;P&gt;I have a chart that I can split by myDate or env, but I cannot get it to split by both myDate and env for example I need to see how many urgency events have taken place on a given myDate by each of the env (environments).&lt;/P&gt;&lt;P&gt;I have used multiple versions of splitting the code and just cannot get this right - any help will be great, this is related to Splunk ES.&lt;/P&gt;&lt;P&gt;`notable`&lt;BR /&gt;| eval env=coalesce(src_bunit, dvc_bunit, dest_bunit)&lt;BR /&gt;| eval env=upper(env)&lt;BR /&gt;| fillnull value="Unknown" env&lt;BR /&gt;| search NOT `suppression` AND env=*&lt;BR /&gt;| eval myDate=strftime(_time, "%Y-%m-%d")&lt;BR /&gt;| chart count by env urgency&lt;BR /&gt;| table myDate env critical high medium low informational&lt;BR /&gt;| fillnull critical high medium low informational&lt;BR /&gt;| rename env AS Environment, critical AS Critical, high AS High, medium AS Medium, low AS Low, informational AS Informational&lt;BR /&gt;| addtotals col=true labelfield=Environment label="Total(s)" row=true&lt;/P&gt;</description>
      <pubDate>Sun, 25 Apr 2021 07:41:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-or-timechart-by-multiple-values/m-p/549256#M155838</guid>
      <dc:creator>sherpedz</dc:creator>
      <dc:date>2021-04-25T07:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Chart or timechart by multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-or-timechart-by-multiple-values/m-p/549259#M155839</link>
      <description>&lt;P&gt;chart loses myDate. Try using stats and then create a field with the name for the series and use that for the xyseries. Something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;`notable`
| eval env=coalesce(src_bunit, dvc_bunit, dest_bunit)
| eval env=if(like(env,"%tgw%") OR like(env,"%TGW%"),"DCT",env)
| eval env=upper(env)
| fillnull value="Unknown" env
| search NOT `suppression` AND env=*
| eval myDate=strftime(_time, "%Y-%m-%d")
| stats count by myDate env urgency
| eval envurgency=env.":".urgency
| xyseries myDate envurgency count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Apr 2021 07:58:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-or-timechart-by-multiple-values/m-p/549259#M155839</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-04-25T07:58:20Z</dc:date>
    </item>
  </channel>
</rss>

