<?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 make X axis display the name of each field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374825#M110169</link>
    <description>&lt;P&gt;Give this a try. (Remove some dead code, merged both searches to get output with single search [no subsearch])&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=msahc sourcetype=msahc_raw | rex "(?&amp;lt;json_field&amp;gt;{[^}]+})" | mvexpand json_field | spath input=json_field | search ACT | rename "IDM Access" as "IDM_Access", "FACTS Database Access" as "FACTS_Database_Access" | table IDM_Access FACTS_Database_Access | eval temp=1 | untable temp FieldName Value | chart count over FieldName by Value
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 22 Aug 2017 15:32:16 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-08-22T15:32:16Z</dc:date>
    <item>
      <title>How to make X axis display the name of each field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374822#M110166</link>
      <description>&lt;P&gt;I have the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=msahc sourcetype=msahc_raw | rex "(?&amp;lt;json_field&amp;gt;{[^}]+})" | mvexpand json_field | spath input=json_field | search ACT | eval DateTime=_time | convert timeformat="%x" ctime(DateTime) | bucket DateTime span=1d | rename "IDM Access" as "IDM_Access", "FACTS Database Access" as "FACTS_Database_Access" | table IDM_Access | chart var(Field="IDM_Access") as Fields count(eval(IDM_Access=="False")) as False count(eval(IDM_Access=="True")) as True | append [search index=msahc sourcetype=msahc_raw | rex "(?&amp;lt;json_field&amp;gt;{[^}]+})" | mvexpand json_field | spath input=json_field | search ACT | eval DateTime=_time | convert timeformat="%x" ctime(DateTime) | bucket DateTime span=1d | rename "IDM Access" as "IDM_Access", "FACTS Database Access" as "FACTS_Database_Access" | table FACTS_Database_Access | chart var(Field="FACTS_Database_Access") as Fields count(eval(FACTS_Database_Access=="False")) as False count(eval(FACTS_Database_Access=="True")) as True]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That generates the following bar chart:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/209627-2017-08-22-10-54-27.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;How can I get the bar chart to display the name of the "Fields", such as IDM_Access and FACTS_Database_Access? &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:24:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374822#M110166</guid>
      <dc:creator>gcescatto</dc:creator>
      <dc:date>2020-09-29T15:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to make X axis display the name of each field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374823#M110167</link>
      <description>&lt;P&gt;@gcescatto, &lt;BR /&gt;
Please ensure to format the splunk search/code using code sample formatter (button about the editing area labeled &lt;CODE&gt;101010&lt;/CODE&gt; or by using Ctrl+K key after selecting the code. &lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 15:15:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374823#M110167</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-08-22T15:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to make X axis display the name of each field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374824#M110168</link>
      <description>&lt;P&gt;I did, but nothing changed...&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 15:27:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374824#M110168</guid>
      <dc:creator>gcescatto</dc:creator>
      <dc:date>2017-08-22T15:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make X axis display the name of each field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374825#M110169</link>
      <description>&lt;P&gt;Give this a try. (Remove some dead code, merged both searches to get output with single search [no subsearch])&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=msahc sourcetype=msahc_raw | rex "(?&amp;lt;json_field&amp;gt;{[^}]+})" | mvexpand json_field | spath input=json_field | search ACT | rename "IDM Access" as "IDM_Access", "FACTS Database Access" as "FACTS_Database_Access" | table IDM_Access FACTS_Database_Access | eval temp=1 | untable temp FieldName Value | chart count over FieldName by Value
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Aug 2017 15:32:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374825#M110169</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-08-22T15:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to make X axis display the name of each field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374826#M110170</link>
      <description>&lt;P&gt;That worked perfectly! Thank you so much. I got the idea. Reducing redundancy makes the search way cleaner and way quicker.  &lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 15:37:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-X-axis-display-the-name-of-each-field/m-p/374826#M110170</guid>
      <dc:creator>gcescatto</dc:creator>
      <dc:date>2017-08-22T15:37:14Z</dc:date>
    </item>
  </channel>
</rss>

