<?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 display data with multiple column and row? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-data-with-multiple-column-and-row/m-p/174131#M49949</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| stats count(eval(status="Failed")) as fail, count(eval(status="Passed")) as pass by workweek subArea
| eval passPercentage=if(pass+fail== 0, "-",round(pass/(pass+fail)*100,2))
| xyseries workweek subArea passPercentage
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 05 Mar 2014 05:49:52 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2014-03-05T05:49:52Z</dc:date>
    <item>
      <title>how to display data with multiple column and row?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-data-with-multiple-column-and-row/m-p/174130#M49948</link>
      <description>&lt;P&gt;I need to create a table which will display&lt;/P&gt;

&lt;P&gt;workweek as rows&lt;/P&gt;

&lt;P&gt;and subarea as column, meanwhile the data inside will display the passing percentage for each subarea for every workweek.&lt;/P&gt;

&lt;P&gt;i tried&lt;/P&gt;

&lt;P&gt;*|stats count(eval(status="Failed")) AS fail,count(eval(status="Passed")) AS pass by workweek|eval passPercentage=if(pass+fail== 0, "-",round(pass/(pass+fail)*100,2))|fields workweek,passPercentage&lt;/P&gt;

&lt;P&gt;This will only calculate for overall passPercentage for each workweek, but i want it to be done with each subarea of each workweek...&lt;/P&gt;

&lt;P&gt;my sample output will be like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;              subArea1 subArea2 subArea3...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;workweek1 12 32 88 &lt;/P&gt;

&lt;P&gt;workweek2 96 45 12 &lt;/P&gt;

&lt;P&gt;workweek3 23 78 43 &lt;/P&gt;

&lt;P&gt;workweek4 37 79 98&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:02:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-data-with-multiple-column-and-row/m-p/174130#M49948</guid>
      <dc:creator>jasklee</dc:creator>
      <dc:date>2020-09-28T16:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to display data with multiple column and row?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-data-with-multiple-column-and-row/m-p/174131#M49949</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| stats count(eval(status="Failed")) as fail, count(eval(status="Passed")) as pass by workweek subArea
| eval passPercentage=if(pass+fail== 0, "-",round(pass/(pass+fail)*100,2))
| xyseries workweek subArea passPercentage
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Mar 2014 05:49:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-data-with-multiple-column-and-row/m-p/174131#M49949</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-03-05T05:49:52Z</dc:date>
    </item>
  </channel>
</rss>

