<?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 bring 2 different numerical fields under one column name in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-bring-2-different-numerical-fields-under-one-column-name/m-p/539800#M152683</link>
    <description>&lt;LI-CODE lang="markup"&gt;|search Account_Environment="*" Acc_Name="*" Baseline="*" Rule="*" 
|stats sum(Compliant_Tested) as Compliant sum(Noncompliant_Tested) as Non_Compliant by Acc_Name Acc_No Baseline form Rule
| eval Compliance=mvappend("Compliant_Machines","Non_Compliant_machines")
| mvexpand Compliance
| eval Count=if(Compliance="Compliant_Machines",Compliant,Non_Compliant)
| fields - Compliant, Non_Compliant&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 13 Feb 2021 17:05:01 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-02-13T17:05:01Z</dc:date>
    <item>
      <title>How to bring 2 different numerical fields under one column name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-bring-2-different-numerical-fields-under-one-column-name/m-p/539790#M152680</link>
      <description>&lt;P&gt;I have to bring 2 different numerical fields in one column name .I am fetching the fields from a view .&lt;/P&gt;&lt;P&gt;Example :I have fields like&amp;nbsp; below ,&lt;/P&gt;&lt;P&gt;field 1 =Compliant_machines(which has count of compliant machines )&lt;/P&gt;&lt;P&gt;field2 =Non_Compliant_machines(which has count of compliant machines )&lt;/P&gt;&lt;P&gt;I have to bring this like below ,&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Compliance&lt;/TD&gt;&lt;TD width="50%"&gt;sum(Count )&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Compliant_Machines&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD width="50%"&gt;123456&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Non_Compliant_machines&lt;/TD&gt;&lt;TD width="50%"&gt;57421&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have acheived this using transpose ,but the drill down is not working using this transpose and stats .&lt;/P&gt;&lt;P&gt;I am used this code for drill down ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;|search Account_Environment="*" Acc_Name="*" Baseline="*" Rule="*" |stats sum(Compliant_Tested) as Compliant sum(Noncompliant_Tested) as "Non Compliant"|transpose|rename column as "Compliance", "row 1" as "count"| search Compliance="Compliant"|table Acc_Name Acc_No Baseline form Rule " etc&lt;/P&gt;&lt;P&gt;The above code didnt work for me .Can someone help me to achieve this in drill down .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 14:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-bring-2-different-numerical-fields-under-one-column-name/m-p/539790#M152680</guid>
      <dc:creator>dtccsundar</dc:creator>
      <dc:date>2021-02-13T14:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to bring 2 different numerical fields under one column name</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-bring-2-different-numerical-fields-under-one-column-name/m-p/539800#M152683</link>
      <description>&lt;LI-CODE lang="markup"&gt;|search Account_Environment="*" Acc_Name="*" Baseline="*" Rule="*" 
|stats sum(Compliant_Tested) as Compliant sum(Noncompliant_Tested) as Non_Compliant by Acc_Name Acc_No Baseline form Rule
| eval Compliance=mvappend("Compliant_Machines","Non_Compliant_machines")
| mvexpand Compliance
| eval Count=if(Compliance="Compliant_Machines",Compliant,Non_Compliant)
| fields - Compliant, Non_Compliant&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 13 Feb 2021 17:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-bring-2-different-numerical-fields-under-one-column-name/m-p/539800#M152683</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-02-13T17:05:01Z</dc:date>
    </item>
  </channel>
</rss>

