<?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: Drilldown chart needs a different query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Drilldown-chart-needs-a-different-query/m-p/59630#M14701</link>
    <description>&lt;P&gt;Can you please post your advanced xml? And are you using Sideview Utils?&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jan 2012 12:51:24 GMT</pubDate>
    <dc:creator>RicoSuave</dc:creator>
    <dc:date>2012-01-30T12:51:24Z</dc:date>
    <item>
      <title>Drilldown chart needs a different query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Drilldown-chart-needs-a-different-query/m-p/59629#M14700</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;

&lt;P&gt;I am doing the Advanced XML and I have a bar chart showing the results of a summary query--the count of values over a time period.  I want to click on a bar and have a second graph appear showing how the value compares to the results over time--the minimum value so far, the maximum value so far, the average, etc.  When I try to put in the second graph, I can hardcode in the values and it works fine.  When I try to use the click.name ($click.name$) or ($click.value$), the query fails.&lt;/P&gt;

&lt;P&gt;Has anyone else seen this?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2012 18:37:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Drilldown-chart-needs-a-different-query/m-p/59629#M14700</guid>
      <dc:creator>wwhitener</dc:creator>
      <dc:date>2012-01-27T18:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Drilldown chart needs a different query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Drilldown-chart-needs-a-different-query/m-p/59630#M14701</link>
      <description>&lt;P&gt;Can you please post your advanced xml? And are you using Sideview Utils?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2012 12:51:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Drilldown-chart-needs-a-different-query/m-p/59630#M14701</guid>
      <dc:creator>RicoSuave</dc:creator>
      <dc:date>2012-01-30T12:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Drilldown chart needs a different query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Drilldown-chart-needs-a-different-query/m-p/59631#M14702</link>
      <description>&lt;P&gt;More information....&lt;/P&gt;

&lt;P&gt;I actually got it to work without Sideview Utils and using multiple variables.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;I had a split-by clause in my highest level search.  So, I ended up using a mix of click.name, click.value, click.name2 &amp;amp; click.value2.&lt;/LI&gt;
&lt;LI&gt;In order to capture every variable, I had to nest the ConvertToIntention modules.  There's a mightily abbreviated version (in case I forget &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt; ) below.&lt;/LI&gt;
&lt;LI&gt;I read somewhere that the drilldown freaks a bit when using the stats command in the parent chart, so I ended up changing my query away from that.  However, streamstats seems to work just fine, so I don't know.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Now if I could just figure out how to get the chart to hide the child chart and results--to reverse the drilldown......&lt;/P&gt;

&lt;P&gt;Cheers!&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;!-- Panel 2 has the overall counts --&amp;gt;
&amp;lt;module name="HiddenSearch" layoutPanel="panel_row2_col1"  autoRun="True"&amp;gt;
    &amp;lt;param name="search"&amp;gt;source=mysource.log | chart count(field1) over field2 by field1&amp;lt;/param&amp;gt;
    &amp;lt;param name="earliest"&amp;gt;-1d&amp;lt;/param&amp;gt;
    &amp;lt;module name="TimeRangePicker"&amp;gt;
      &amp;lt;param name="default"&amp;gt;Today&amp;lt;/param&amp;gt;
      &amp;lt;param name="searchWhenChanged"&amp;gt;True&amp;lt;/param&amp;gt;

    &amp;lt;module name="HiddenChartFormatter"&amp;gt;
        &amp;lt;param name="charting.primaryAxisTitle.text"&amp;gt;(Field2) Counts&amp;lt;/param&amp;gt;
        &amp;lt;param name="charting.secondaryAxisTitle.text"&amp;gt;Count of Events&amp;lt;/param&amp;gt;
        &amp;lt;param name="charting.legend.placement"&amp;gt;none&amp;lt;/param&amp;gt;
        &amp;lt;param name="charting.chart"&amp;gt;column&amp;lt;/param&amp;gt;
        &amp;lt;param name="charting.seriesColors"&amp;gt;[0xf055FF, 0xfC0000, 0x0FFF66]&amp;lt;/param&amp;gt;
        &amp;lt;param name="charting.chart.style"&amp;gt;shiny&amp;lt;/param&amp;gt;
        &amp;lt;param name="charting.legend.masterLegend" /&amp;gt;
        &amp;lt;param name="charting.legend"&amp;gt;legend&amp;lt;/param&amp;gt;
        &amp;lt;param name="charting.legend.placement"&amp;gt;left&amp;lt;/param&amp;gt;
        &amp;lt;param name="charting.legend.labelStyle.maximumWidth"&amp;gt;500&amp;lt;/param&amp;gt;
        &amp;lt;param name="charting.legend.labelStyle.defaultTextFormat"&amp;gt;{italic:true,size:14}&amp;lt;/param&amp;gt;
        &amp;lt;module name="JobProgressIndicator" /&amp;gt;

        &amp;lt;!-- This is the totals chart to click on --&amp;gt;
        &amp;lt;module name="FlashChart"&amp;gt;
            &amp;lt;param name="width"&amp;gt;75%&amp;lt;/param&amp;gt;
            &amp;lt;param name="height"&amp;gt;250px&amp;lt;/param&amp;gt;

            &amp;lt;!-- Begin the drill down custom coding --&amp;gt;

             &amp;lt;!-- Start Simple results header --&amp;gt;
             &amp;lt;!-- For any query, use this to determine your variables and values --&amp;gt;
             &amp;lt;!-- Note, click.value, click.value2, click.name, click.name2 --&amp;gt;
             &amp;lt;module name="SimpleResultsHeader"&amp;gt;
                 &amp;lt;param name="entityName"&amp;gt;events&amp;lt;/param&amp;gt;
                 &amp;lt;!-- Note:  Additional $time$, $count$ here --&amp;gt;
                 &amp;lt;param name="headerFormat"&amp;gt;Found $count$ event(s) for field2=$click.value$ and field1=$click.name2$ $time$&amp;lt;/param&amp;gt;
             &amp;lt;/module&amp;gt;
             &amp;lt;!-- End Simple Results header --&amp;gt;


             &amp;lt;!-- This is an inner chart and search to show statistics on the barchart click --&amp;gt;
             &amp;lt;module name="HiddenSearch"&amp;gt;
                &amp;lt;param name="search"&amp;gt;source=mysource.log field2=$value2$ field1=$value1$ | timechart count(field2) as MyCount | streamstats avg(MyCount) as AvgCount, min(MyCount) as MinCount, max(MyCount) as MaxCount &amp;lt;/param&amp;gt;

                &amp;lt;module name="ConvertToIntention"&amp;gt;    
                    &amp;lt;param name="intention"&amp;gt;
                        &amp;lt;param name="name"&amp;gt;stringreplace&amp;lt;/param&amp;gt;

                        &amp;lt;param name="arg"&amp;gt;
                            &amp;lt;param name="value2"&amp;gt;
                                &amp;lt;param name="value"&amp;gt;$click.value$&amp;lt;/param&amp;gt;
                            &amp;lt;/param&amp;gt;
                        &amp;lt;/param&amp;gt;

                        &amp;lt;!-- tells the addterm intention to put our term in the first search clause no matter what. --&amp;gt;
                        &amp;lt;param name="flags"&amp;gt;
                          &amp;lt;list&amp;gt;indexed&amp;lt;/list&amp;gt;
                        &amp;lt;/param&amp;gt;
                    &amp;lt;/param&amp;gt;
                    &amp;lt;!-- This inner ConvertToIntention takes care of the second $event$ variable --&amp;gt;     
                    &amp;lt;module name="ConvertToIntention"&amp;gt;    
                        &amp;lt;param name="intention"&amp;gt;
                            &amp;lt;param name="name"&amp;gt;stringreplace&amp;lt;/param&amp;gt;
                            &amp;lt;param name="arg"&amp;gt;
                                &amp;lt;param name="value1"&amp;gt;
                                    &amp;lt;param name="value"&amp;gt;$click.name2$&amp;lt;/param&amp;gt;
                                &amp;lt;/param&amp;gt;
                            &amp;lt;/param&amp;gt;
                        &amp;lt;!-- tells the addterm intention to put our term in the first search clause no matter what. --&amp;gt;
                        &amp;lt;param name="flags"&amp;gt;
                          &amp;lt;list&amp;gt;indexed&amp;lt;/list&amp;gt;
                        &amp;lt;/param&amp;gt;
                      &amp;lt;/param&amp;gt;

                      &amp;lt;module name="JobProgressIndicator"/&amp;gt;

                      &amp;lt;!-- The inner chart to display --&amp;gt;      
                      &amp;lt;module name="HiddenChartFormatter"&amp;gt;
                            &amp;lt;param name="charting.primaryAxisTitle.text"&amp;gt;Drilldown Counts&amp;lt;/param&amp;gt;
                            &amp;lt;param name="charting.secondaryAxisTitle.text"&amp;gt;Count of Events&amp;lt;/param&amp;gt;
                            &amp;lt;param name="charting.legend.placement"&amp;gt;left&amp;lt;/param&amp;gt;
                            &amp;lt;param name="charting.seriesColors"&amp;gt;[0x0099FF, 0xCC66FF, 0xFF3333, 0x3333FF]&amp;lt;/param&amp;gt;
                            &amp;lt;param name="charting.chart.style"&amp;gt;shiny&amp;lt;/param&amp;gt;
                            &amp;lt;param name="charting.chart"&amp;gt;line&amp;lt;/param&amp;gt;
                            &amp;lt;module name="FlashChart"&amp;gt;
                                &amp;lt;param name="width"&amp;gt;100%&amp;lt;/param&amp;gt;
                                &amp;lt;param name="height"&amp;gt;150px&amp;lt;/param&amp;gt;
                            &amp;lt;/module&amp;gt;       
                        &amp;lt;/module&amp;gt;
                        &amp;lt;!-- End of inner HiddenChartFormatter --&amp;gt;

                        &amp;lt;!-- Now to add Results --&amp;gt;
                        &amp;lt;module name="Paginator"&amp;gt;
                            &amp;lt;param name="entityName"&amp;gt;events&amp;lt;/param&amp;gt;
                            &amp;lt;param name="maxPages"&amp;gt;10&amp;lt;/param&amp;gt;
                            &amp;lt;module name="EventsViewer"&amp;gt;
                                &amp;lt;param name="segmentation"&amp;gt;full&amp;lt;/param&amp;gt;
                                &amp;lt;param name="reportFieldLink"&amp;gt;report_builder_format_report&amp;lt;/param&amp;gt;
                            &amp;lt;/module&amp;gt;
                        &amp;lt;/module&amp;gt;
                        &amp;lt;!-- End the Results --&amp;gt;

                    &amp;lt;/module&amp;gt;
                    &amp;lt;!-- end of second ConvertToIntention --&amp;gt;
                  &amp;lt;/module&amp;gt;                       
                  &amp;lt;!-- End of outer ConvertToIntention --&amp;gt;                  
                &amp;lt;!--  End the drilldown custom coding --&amp;gt;
                &amp;lt;/module&amp;gt;
                &amp;lt;!-- End Interior HiddenSearch --&amp;gt;
            &amp;lt;/module&amp;gt;
            &amp;lt;!-- End of interior FlashChart --&amp;gt;
        &amp;lt;/module&amp;gt;
        &amp;lt;!-- End Chart Formatter --&amp;gt;
    &amp;lt;/module&amp;gt;
    &amp;lt;!-- End TimeRangePicker --&amp;gt;
&amp;lt;/module&amp;gt;
&amp;lt;!-- End Panel 2 --&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2012 15:33:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Drilldown-chart-needs-a-different-query/m-p/59631#M14702</guid>
      <dc:creator>wwhitener</dc:creator>
      <dc:date>2012-01-30T15:33:01Z</dc:date>
    </item>
  </channel>
</rss>

