<?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: Table showing empty cells in Feedback</title>
    <link>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/748364#M554</link>
    <description>&lt;P&gt;Any time that you use the stats command, anything that is not specifically called out in the by statement (for example&amp;nbsp; | stats count by fieldx, fieldy, fieldz&amp;nbsp; &amp;nbsp;will no longer be part of your dataset.&amp;nbsp; In the example you will only have fieldx, fieldy, and fieldz)&amp;nbsp; if you want to keep your fields to be used after the stats command use the values command.&lt;BR /&gt;&lt;BR /&gt;| stats values(fielda) as fielda, values(fieldb) as fieldb count by fieldx, fieldy, fieldz&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;Or&amp;nbsp;&lt;BR /&gt;| stats values(*) as * count by fieldx, fieldy, fieldz&amp;nbsp;&amp;nbsp;&lt;BR /&gt;though values(*) as * is a lot more performance intensive than calling out the fields with values&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jun 2025 17:03:09 GMT</pubDate>
    <dc:creator>moorte</dc:creator>
    <dc:date>2025-06-19T17:03:09Z</dc:date>
    <item>
      <title>Table showing empty cells</title>
      <link>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/740711#M494</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hello everyone!&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am currently navigating and learning how to calculate and use specific commands. I am currently trying to add new columns to a table where I want to add the average of ghost% and missing% based on a location.&amp;nbsp; However, it shows empty cells. Also, I want to show the values eventually in a chart in percentages and not decimals. Can anyone guide me in what is wrong with this query? Thank you!&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chart count by AREAID event |&amp;nbsp;| eval Ghost=max(0,Ghost-Missing) |&lt;/P&gt;&lt;P&gt;eval "Ghost %"=Ghost/TotalTubs*100,"Missing %"=Missing/TotalTubs*100 |&lt;/P&gt;&lt;P&gt;fields AREAID "Missing" "Ghost" "Missing %" "Ghost %" |&lt;/P&gt;&lt;P&gt;stats avg(Missing) as avg_missing, avg(Ghost) as avg_ghost, by AREAIDsum(TotalTubs) as total_tubs by AREAID |&lt;/P&gt;&lt;P&gt;eval "Average Missing %"=avg_missing/total_tubs*100, "Average Ghost %"=avg_ghost/total_tubs*100 |&lt;/P&gt;&lt;P&gt;table AREAID avg_missing avg_ghost total_tubs "Average Missing %" "Average Ghost %" |&lt;/P&gt;&lt;P&gt;fields "AREAID", "Average Ghost %", "Average Missing %", "Ghost %", "Missing %", "total_tubs"&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 15:43:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/740711#M494</guid>
      <dc:creator>Simona11</dc:creator>
      <dc:date>2025-03-04T15:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Table showing empty cells</title>
      <link>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/740714#M495</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308199"&gt;@Simona11&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This query generates dummy data for five locations (AREAID), assigns random values for Ghost, Missing, and TotalTubs, then calculates their percentages and averages. Finally, it summarizes the average missing and ghost percentages per location and displays them in a table.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| makeresults count=5 &lt;BR /&gt;| streamstats count &lt;BR /&gt;| eval AREAID=case(count=1, "A1", count=2, "A2", count=3, "A3", count=4, "A4", count=5, "A5") &lt;BR /&gt;| eval Ghost=random()%100, Missing=random()%80, TotalTubs=200+random()%300 &lt;BR /&gt;| eval Ghost=max(0, Ghost-Missing) &lt;BR /&gt;| eval "Ghost %"=round(Ghost/TotalTubs*100,2), "Missing %"=round(Missing/TotalTubs*100,2) &lt;BR /&gt;| stats avg(Missing) as avg_missing, avg(Ghost) as avg_ghost, sum(TotalTubs) as total_tubs by AREAID &lt;BR /&gt;| eval "Average Missing %"=round(avg_missing/total_tubs*100,2), "Average Ghost %"=round(avg_ghost/total_tubs*100,2) &lt;BR /&gt;| table AREAID avg_missing avg_ghost total_tubs "Average Missing %" "Average Ghost %"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiran_panchavat_0-1741085392633.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/37964iCD39E0D909596223/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kiran_panchavat_0-1741085392633.png" alt="kiran_panchavat_0-1741085392633.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 10:51:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/740714#M495</guid>
      <dc:creator>kiran_panchavat</dc:creator>
      <dc:date>2025-03-04T10:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Table showing empty cells</title>
      <link>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/740715#M496</link>
      <description>&lt;P&gt;I will have a look over my break. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 10:53:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/740715#M496</guid>
      <dc:creator>Simona11</dc:creator>
      <dc:date>2025-03-04T10:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Table showing empty cells</title>
      <link>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/743465#M532</link>
      <description>&lt;P class=""&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308199"&gt;@Simona11&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Your Splunk query has several issues that are likely causing the empty cells and incorrect results.&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;STRONG&gt;| chart count by AREAID event&lt;BR /&gt;| eval Ghost = max(0, Ghost - Missing)&lt;BR /&gt;| eval "Ghost %" = Ghost / TotalTubs * 100, "Missing %" = Missing / TotalTubs * 100&lt;BR /&gt;| fields AREAID Missing Ghost "Missing %" "Ghost %"&lt;BR /&gt;| stats avg(Missing) as avg_missing, avg(Ghost) as avg_ghost, sum(TotalTubs) as total_tubs by AREAID&lt;BR /&gt;| eval "Average Missing %" = avg_missing / total_tubs * 100, "Average Ghost %" = avg_ghost / total_tubs * 100&lt;BR /&gt;| table AREAID avg_missing avg_ghost total_tubs "Average Missing %" "Average Ghost %"&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;If you want to display this in a percentage-based &lt;/SPAN&gt;chart&lt;SPAN&gt;, use:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;| chart avg("Average Missing %") as "Average Missing %", avg("Average Ghost %") as "Average Ghost %" by AREAID&lt;BR /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;BR /&gt;This will generate a chart where &lt;/SPAN&gt;&lt;STRONG&gt;AREAID&lt;/STRONG&gt;&lt;SPAN&gt; is on the x-axis, and the &lt;/SPAN&gt;&lt;STRONG&gt;average percentages&lt;/STRONG&gt;&lt;SPAN&gt; are on the y-axis.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 20:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/743465#M532</guid>
      <dc:creator>iamsahilshaiks</dc:creator>
      <dc:date>2025-04-03T20:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Table showing empty cells</title>
      <link>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/748364#M554</link>
      <description>&lt;P&gt;Any time that you use the stats command, anything that is not specifically called out in the by statement (for example&amp;nbsp; | stats count by fieldx, fieldy, fieldz&amp;nbsp; &amp;nbsp;will no longer be part of your dataset.&amp;nbsp; In the example you will only have fieldx, fieldy, and fieldz)&amp;nbsp; if you want to keep your fields to be used after the stats command use the values command.&lt;BR /&gt;&lt;BR /&gt;| stats values(fielda) as fielda, values(fieldb) as fieldb count by fieldx, fieldy, fieldz&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;Or&amp;nbsp;&lt;BR /&gt;| stats values(*) as * count by fieldx, fieldy, fieldz&amp;nbsp;&amp;nbsp;&lt;BR /&gt;though values(*) as * is a lot more performance intensive than calling out the fields with values&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 17:03:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Feedback/Table-showing-empty-cells/m-p/748364#M554</guid>
      <dc:creator>moorte</dc:creator>
      <dc:date>2025-06-19T17:03:09Z</dc:date>
    </item>
  </channel>
</rss>

