<?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: Plain histogram of x-axis values over y-axis in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340818#M101066</link>
    <description>&lt;P&gt;Yes. I can provide you. "pr" is PageRank of the "id" node. Each node has only 1 "pr". Following is the sample.&lt;/P&gt;

&lt;P&gt;name    id  pr  count   name2   id2&lt;BR /&gt;
148 148 0.199162542 64  148 148&lt;BR /&gt;
243 243 1.126083355 29  243 243&lt;BR /&gt;
31  31  0.17263125  55  31  31&lt;BR /&gt;
85  85  0.16646875  136 85  85&lt;BR /&gt;
137 137 0.207598883 51  137 137&lt;BR /&gt;
251 251 0.505910879 26  251 251&lt;BR /&gt;
65  65  0.729124137 25  65  65&lt;BR /&gt;
53  53  0.38208409  55  53  53&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2017 04:45:03 GMT</pubDate>
    <dc:creator>mahikrrish</dc:creator>
    <dc:date>2017-06-10T04:45:03Z</dc:date>
    <item>
      <title>Plain histogram of x-axis values over y-axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340812#M101060</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I want to create plain and simple histogram in Splunk, like everyone used to do in school days on graph paper. I have selected "id", and "pr" fields. I want "id" to be on x-axis and its corresponding value of "pr" on y-axis. How should I do that? Splunk isn't allowing me to do that. I don't want to use Sum, Count, Max, Min, Standard Deviation, Mode. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="HVR_1 PageRank.csv" id="*" pr="*" | chart pr over id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can anyone correct my code? Please!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 06:13:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340812#M101060</guid>
      <dc:creator>mahikrrish</dc:creator>
      <dc:date>2017-06-09T06:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Plain histogram of x-axis values over y-axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340813#M101061</link>
      <description>&lt;P&gt;Do you have a handful of sample data you could provide?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 14:24:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340813#M101061</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-06-09T14:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Plain histogram of x-axis values over y-axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340814#M101062</link>
      <description>&lt;P&gt;So what if there's more than one pr for one id?  Which pr value should it use?  How would Splunk know that?&lt;/P&gt;

&lt;P&gt;Is there a time aspect to this data?  Or is it only a "most recent value" type dataset?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 14:26:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340814#M101062</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-06-09T14:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Plain histogram of x-axis values over y-axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340815#M101063</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;source="HVR_1 PageRank.csv" id="*" pr="*" | chart last(pr) as pr over id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But as rich7177 points out, this may not be exactly what you want.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 14:37:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340815#M101063</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2017-06-09T14:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Plain histogram of x-axis values over y-axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340816#M101064</link>
      <description>&lt;P&gt;You are rejecting the methods that work.  WHY?&lt;/P&gt;

&lt;P&gt;You are focused on creating a histogram, which means that for each value of id, there must be a single unique numeric value of pr that constitutes how tall the bar will be.   &lt;/P&gt;

&lt;P&gt;What, exactly, does the value of pr mean?  It must be a number, for the one-dimensional histogram you are asking for to exist.  &lt;/P&gt;

&lt;P&gt;If pr is not a number, then COUNT is the only aggregate function that makes sense.  Use that.  (If there are multiple possible values of pr for each id, you could use distinct count also, or you could abandon the single-dimension histogram in favor of something else.)&lt;/P&gt;

&lt;P&gt;If pr is a number, and if there is only one event for each value of pr in each value of id, then SUM, MAX, MIN, AVG will all work and will all get the same answer.&lt;/P&gt;

&lt;P&gt;If pr is a number, and there are multiple possible events for each combination of pr and id, then you need to decide exactly what you are trying to graph.  Figure out the math for "how do I know how tall the bar needs to be?" and then code that into the chart command (or any other command).&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;On the other hand, if you want to do an x-y plot of various values, try visualizations that are not bar charts.  Specifically, try the bubble chart and other x-y plots to see if they meet your need.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 14:39:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340816#M101064</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-09T14:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Plain histogram of x-axis values over y-axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340817#M101065</link>
      <description>&lt;P&gt;I've had this sort of question come up a lot,  and I thought maybe I'd give a different kind of answer,  in case it was helpful or complementary. &lt;/P&gt;

&lt;P&gt;Questions are more or less "I want to just chart the raw values,  as points on a screen.  Typically a timechart. "&lt;BR /&gt;
And they come up in two ways: &lt;BR /&gt;
a) I don't want to bucket the times,  and I don't want to think about avg/min/max, because there aren't very many of them!    I just want the values on the screen &lt;BR /&gt;
b) I don't want to bucket the times and/or think about avg/min/max  because I want the human eye to see the storm of points as a scatter plot and I think that'll be better than some clever statistic. &lt;/P&gt;

&lt;P&gt;And there are a few ways to answer it. &lt;/P&gt;

&lt;P&gt;1) OK,  you can throw the raw points at the chart,  you just have to use no actual transforming command at all! &lt;BR /&gt;
Here's a good canonical answer&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/211376/how-to-chart-raw-windows-perfmon-values-over-time.html"&gt;https://answers.splunk.com/answers/211376/how-to-chart-raw-windows-perfmon-values-over-time.html&lt;/A&gt;&lt;BR /&gt;
Con - If your time granularity exceeds (or greatly exceeds) the number of pixels on the screen.....  you're not going to have a good time.   ie the "storm of points" may just be a weird fuzzy block of noise. &lt;BR /&gt;
Con - the charting framework doesn't really like to graph tens of, or hundreds of thousands of points.  You might now or down the road get some truncation and error messages about truncation. &lt;/P&gt;

&lt;P&gt;2) Sometimes the correct answer is to really come back and use some statistical aggregation,  and resign yourself to a particular bucketing of the time values.   Here's a good, if verbose question that covers this: &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/386217/displaying-average-from-a-timechart.html"&gt;https://answers.splunk.com/answers/386217/displaying-average-from-a-timechart.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;3) and there are sometimes other outlier answers, like this one here to use first()  as a shoot from the hip heuristic. &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/6216/how-to-plot-values-without-using-max-avg-count.html"&gt;https://answers.splunk.com/answers/6216/how-to-plot-values-without-using-max-avg-count.html&lt;/A&gt;&lt;BR /&gt;
but this seems imo pretty problematic and potentially misleading.  use with caution. &lt;/P&gt;

&lt;P&gt;Kind of sprawling answer.   Perhaps not really an "answer" at all and more of a "further reading" post. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 19:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340817#M101065</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2017-06-09T19:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Plain histogram of x-axis values over y-axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340818#M101066</link>
      <description>&lt;P&gt;Yes. I can provide you. "pr" is PageRank of the "id" node. Each node has only 1 "pr". Following is the sample.&lt;/P&gt;

&lt;P&gt;name    id  pr  count   name2   id2&lt;BR /&gt;
148 148 0.199162542 64  148 148&lt;BR /&gt;
243 243 1.126083355 29  243 243&lt;BR /&gt;
31  31  0.17263125  55  31  31&lt;BR /&gt;
85  85  0.16646875  136 85  85&lt;BR /&gt;
137 137 0.207598883 51  137 137&lt;BR /&gt;
251 251 0.505910879 26  251 251&lt;BR /&gt;
65  65  0.729124137 25  65  65&lt;BR /&gt;
53  53  0.38208409  55  53  53&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2017 04:45:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340818#M101066</guid>
      <dc:creator>mahikrrish</dc:creator>
      <dc:date>2017-06-10T04:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Plain histogram of x-axis values over y-axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340819#M101067</link>
      <description>&lt;P&gt;"pr" is the PageRank of "id" node. Every "id" has only one "pr". Is not "Sum of pr" is addition of all nodes "pr"? Or, does it just plot the histogram on 1:1 basis, like one value from x-axis pointing to only one value on y-axis?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2017 04:50:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340819#M101067</guid>
      <dc:creator>mahikrrish</dc:creator>
      <dc:date>2017-06-10T04:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Plain histogram of x-axis values over y-axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340820#M101068</link>
      <description>&lt;P&gt;That depends on your query.  If each value of id has only one value of pr returned by the query, and that value is numerical, then that value is indistinguishable from most aggregate functions: mathematically, it is equal to the max, the min, the mode, the mean, and the average; sequentially, it is the first, the last, the earliest, and the latest; Set-wise, it is completely equivalent to the list() and the values(). So, for that case where the id-pr relationship is 1-1, almost any meaningful aggregate function will serve.  (Okay, not the stdev, but that wouldn't be meaningful.)&lt;/P&gt;

&lt;P&gt;When you &lt;CODE&gt;| chart sum(pr) over id&lt;/CODE&gt;, then &lt;STRONG&gt;for each id&lt;/STRONG&gt;, splunk will calculate the sum of the pr values.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2017 19:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Plain-histogram-of-x-axis-values-over-y-axis/m-p/340820#M101068</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-11T19:05:48Z</dc:date>
    </item>
  </channel>
</rss>

