<?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: Need help to create a transpose of a table in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594420#M48752</link>
    <description>&lt;P&gt;This is another classic problem of trying to get splunk to report on something that didn't happen (or at least isn't in the set of events in the pipeline). If there are no 500 errors in the timeframe, you won't get them reported on, unless you artificially inject dummy zero counts for the status errors you are expecting.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Apr 2022 10:53:42 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-04-20T10:53:42Z</dc:date>
    <item>
      <title>Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594376#M48739</link>
      <description>&lt;P&gt;I have created a table as below&amp;nbsp; using the query&amp;nbsp; index=xyz | stats count(Status) as Total by Transaction,Status&lt;/P&gt;&lt;TABLE border="1" width="61.935483870967744%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20.301075268817208%"&gt;Transaction&lt;/TD&gt;&lt;TD width="28.688172043010752%"&gt;Status&lt;/TD&gt;&lt;TD width="12.946236559139791%"&gt;count(Status)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.301075268817208%"&gt;A&lt;/TD&gt;&lt;TD width="28.688172043010752%"&gt;200 OK&lt;/TD&gt;&lt;TD width="12.946236559139791%"&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.301075268817208%"&gt;A&lt;/TD&gt;&lt;TD width="28.688172043010752%"&gt;&lt;SPAN&gt;400 Bad Request&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="12.946236559139791%"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.301075268817208%"&gt;B&lt;/TD&gt;&lt;TD width="28.688172043010752%"&gt;200 OK&lt;/TD&gt;&lt;TD width="12.946236559139791%"&gt;110&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.301075268817208%"&gt;B&lt;/TD&gt;&lt;TD width="28.688172043010752%"&gt;&lt;SPAN&gt;400 Bad Request&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="12.946236559139791%"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.301075268817208%"&gt;B&lt;/TD&gt;&lt;TD width="28.688172043010752%"&gt;&lt;SPAN&gt;500 Internal Server Error&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="12.946236559139791%"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.301075268817208%"&gt;C&lt;/TD&gt;&lt;TD width="28.688172043010752%"&gt;200 OK&lt;/TD&gt;&lt;TD width="12.946236559139791%"&gt;85&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.301075268817208%"&gt;C&lt;/TD&gt;&lt;TD width="28.688172043010752%"&gt;&lt;SPAN&gt;400 Bad Request&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="12.946236559139791%"&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20.301075268817208%"&gt;C&lt;/TD&gt;&lt;TD width="28.688172043010752%"&gt;&lt;SPAN&gt;500 Internal Server Error&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="12.946236559139791%"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;But I want to get a transpose of the table as below:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%"&gt;Transaction&lt;/TD&gt;&lt;TD width="20%"&gt;200 OK&lt;/TD&gt;&lt;TD width="20%"&gt;&lt;SPAN&gt;400 Bad Request&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%"&gt;&lt;SPAN&gt;500 Internal Server Error&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="20%"&gt;Total&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%"&gt;A&lt;/TD&gt;&lt;TD width="20%"&gt;45&lt;/TD&gt;&lt;TD width="20%"&gt;20&lt;/TD&gt;&lt;TD width="20%"&gt;0&lt;/TD&gt;&lt;TD width="20%"&gt;65&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%"&gt;B&lt;/TD&gt;&lt;TD width="20%"&gt;110&lt;/TD&gt;&lt;TD width="20%"&gt;15&lt;/TD&gt;&lt;TD width="20%"&gt;5&lt;/TD&gt;&lt;TD width="20%"&gt;130&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%"&gt;C&lt;/TD&gt;&lt;TD width="20%"&gt;85&lt;/TD&gt;&lt;TD width="20%"&gt;25&lt;/TD&gt;&lt;TD width="20%"&gt;30&lt;/TD&gt;&lt;TD width="20%"&gt;140&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Please help me to create a query to get the desired output.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 08:00:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594376#M48739</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2022-04-20T08:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594379#M48740</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230871"&gt;@Mrig342&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;did you explored the chart command? for more infos see at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.6/SearchReference/Chart" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.6/SearchReference/Chart&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; index=xyz 
| chart count OVER Status BY Transaction
| addtotals&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 08:07:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594379#M48740</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-20T08:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594380#M48741</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;is almost correct, the OVER and BY fields should be swapped, and you might also need a fillnull&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart count OVER Transaction by Status
| fillnull value=0
| addtotals&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Apr 2022 08:23:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594380#M48741</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-20T08:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594386#M48742</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wrong every time by reversing OVER and BY &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 08:47:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594386#M48742</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-20T08:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594389#M48743</link>
      <description>&lt;P&gt;Personally, I don't use OVER; the first field of BY is the first column and provides the x-axis in line and column charts for example, the second field of BY provides the remaining column headers and provides the series names e.g. this could have been written as&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart count by Transaction Status
| fillnull value=0
| addtotals&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 09:01:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594389#M48743</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-20T09:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594405#M48744</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;for you help.&lt;/P&gt;&lt;P&gt;What if I want to keep the "Total" column in second place just after "Transaction" column and not at the last. How to modify it..? I tried to use table command but that keeps the null fields empty and not with a zero.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 10:22:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594405#M48744</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2022-04-20T10:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594407#M48745</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230871"&gt;@Mrig342&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you want to change the column order, you have to add a table command at the end of your search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; index=xyz 
| chart count OVER Transaction BY Status
| addtotals
| table Transaction Total "200 OK" "400 Bad Request" "500 Internal Server Error"	&lt;/LI-CODE&gt;&lt;P&gt;if one of the answers solves your need, please accept it for the other people of Community.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 10:27:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594407#M48745</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-20T10:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594410#M48747</link>
      <description>&lt;P&gt;As I said, you may need the fillnull command&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart count OVER Transaction by Status
| fillnull value=0
| addtotals
| table Transaction Total *&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Apr 2022 10:35:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594410#M48747</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-20T10:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594414#M48749</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the table command. But if there no value for a time range then it doesn't fill the null values with zero.&amp;nbsp; For example: if I change the time range to last 15 minutes the table becomes like below:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;Transaction&lt;/TD&gt;&lt;TD width="12.5%"&gt;Total&lt;/TD&gt;&lt;TD width="12.5%"&gt;200 OK&lt;/TD&gt;&lt;TD width="25%"&gt;400 Bad Request&lt;/TD&gt;&lt;TD width="25%"&gt;500 Internal Server Error&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;A&lt;/TD&gt;&lt;TD width="12.5%"&gt;19&lt;/TD&gt;&lt;TD width="12.5%"&gt;7&lt;/TD&gt;&lt;TD width="25%"&gt;12&lt;/TD&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;B&lt;/TD&gt;&lt;TD width="12.5%"&gt;9&lt;/TD&gt;&lt;TD width="12.5%"&gt;0&lt;/TD&gt;&lt;TD width="25%"&gt;9&lt;/TD&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;C&lt;/TD&gt;&lt;TD width="12.5%"&gt;1&lt;/TD&gt;&lt;TD width="12.5%"&gt;1&lt;/TD&gt;&lt;TD width="25%"&gt;0&lt;/TD&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;Please help to find a way to keep the values as zero for null fields.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 10:43:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594414#M48749</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2022-04-20T10:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594418#M48751</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230871"&gt;@Mrig342&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;did you tried the hint from&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fillnull value=0&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 10:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594418#M48751</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-20T10:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594420#M48752</link>
      <description>&lt;P&gt;This is another classic problem of trying to get splunk to report on something that didn't happen (or at least isn't in the set of events in the pipeline). If there are no 500 errors in the timeframe, you won't get them reported on, unless you artificially inject dummy zero counts for the status errors you are expecting.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 10:53:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594420#M48752</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-20T10:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to create a transpose of a table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594425#M48753</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230871"&gt;@Mrig342&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;This will do the trick.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup Test1.csv 
| chart sum(count) by Transaction Status
| fillnull value=0
| addtotals&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gr0und_Z3r0_0-1650452331113.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19146i232735E5072DFAA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gr0und_Z3r0_0-1650452331113.png" alt="Gr0und_Z3r0_0-1650452331113.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 10:59:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-to-create-a-transpose-of-a-table/m-p/594425#M48753</guid>
      <dc:creator>Gr0und_Z3r0</dc:creator>
      <dc:date>2022-04-20T10:59:09Z</dc:date>
    </item>
  </channel>
</rss>

