<?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: Custom Drill-down from Total Row in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306891#M19551</link>
    <description>&lt;P&gt;Following is a run anywhere example just change the App Name and Dashboard Name. In fact even if you do not have right app and dashboard you should be able to see the values being sent as Selected vendor column value or asterisk in case the same is Total. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd
| eval vendor=log_level
| stats count by vendor
| addcoltotals labelfield=vendor&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;condition match="$row.vendor$==&amp;amp;quot;Total&amp;amp;quot;"&amp;gt;
            &amp;lt;link&amp;gt;app/&amp;lt;myappname&amp;gt;/&amp;lt;MyTestDashboard&amp;gt;/form.Vendor=*&amp;lt;/link&amp;gt;
          &amp;lt;/condition&amp;gt;
          &amp;lt;condition&amp;gt;
            &amp;lt;link&amp;gt;app/&amp;lt;myappname&amp;gt;/&amp;lt;MyTestDashboard&amp;gt;/form.Vendor=$row.vendor$&amp;lt;/link&amp;gt;
          &amp;lt;/condition&amp;gt;
        &amp;lt;/drilldown&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to test out whether the tokens are being set properly instead of link you can use set or eval for the same and print out the token using html&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;eval token="SelectedField"&amp;gt;if($row.vendor=="Total","*",$row.vendor)&amp;lt;/eval&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is example of html section.&lt;BR /&gt;
          &lt;BR /&gt;
            Selected Field Name: $SelectedField$&lt;BR /&gt;
          &lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2017 17:35:49 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-02-17T17:35:49Z</dc:date>
    <item>
      <title>Custom Drill-down from Total Row</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306886#M19546</link>
      <description>&lt;P&gt;I have a statistic table showed below.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;vendor        low     medium       high
----------    -----   ------------ -------
V1            1       2             3
V2            2       4             5
Total         3       6             8
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I set up a custom drill-down, for instance, for the vendor column, how can I set up a condition when clicked "Total" and it passes "*" to the custom drill-down?   Thanks. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;drilldown&amp;gt;
     &amp;lt;link field="vendor"&amp;gt;
         /app/my_app/details?form.vendor=$row.vendor$
     &amp;lt;/link&amp;gt;
&amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Feb 2017 21:31:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306886#M19546</guid>
      <dc:creator>splunkrocks2014</dc:creator>
      <dc:date>2017-02-16T21:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Drill-down from Total Row</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306887#M19547</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2500iB36F3C3D1502BDAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
Please try the following to default the vendor form token to asterix * in case clicked field value is Total. Assuming your app name is &lt;STRONG&gt;my_app&lt;/STRONG&gt; and view name is &lt;STRONG&gt;details&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;drilldown&amp;gt;
  &amp;lt;condition match="$row.vendor$==&amp;amp;quot;Total&amp;amp;quot;"&amp;gt;
    &amp;lt;link&amp;gt;/app/my_app/details?form.vendor=*&amp;lt;/link&amp;gt;
  &amp;lt;/condition&amp;gt;
  &amp;lt;condition&amp;gt;
    &amp;lt;link&amp;gt;/app/my_app/details?form.vendor=$row.vendor$&amp;lt;/link&amp;gt;
  &amp;lt;/condition&amp;gt;
&amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Feb 2017 08:50:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306887#M19547</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-02-17T08:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Drill-down from Total Row</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306888#M19548</link>
      <description>&lt;P&gt;The condition is never triggered. &lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 16:59:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306888#M19548</guid>
      <dc:creator>splunkrocks2014</dc:creator>
      <dc:date>2017-02-17T16:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Drill-down from Total Row</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306889#M19549</link>
      <description>&lt;P&gt;You column name is vendor right?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 17:17:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306889#M19549</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-02-17T17:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Drill-down from Total Row</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306890#M19550</link>
      <description>&lt;P&gt;That's correct.  &lt;/P&gt;

&lt;P&gt;It works if clicked on a non-total cell.  Also, I removed the second condition and directly clicked on "Total", and it just ran the default Splunk query.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 17:24:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306890#M19550</guid>
      <dc:creator>splunkrocks2014</dc:creator>
      <dc:date>2017-02-17T17:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Drill-down from Total Row</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306891#M19551</link>
      <description>&lt;P&gt;Following is a run anywhere example just change the App Name and Dashboard Name. In fact even if you do not have right app and dashboard you should be able to see the values being sent as Selected vendor column value or asterisk in case the same is Total. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd
| eval vendor=log_level
| stats count by vendor
| addcoltotals labelfield=vendor&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;condition match="$row.vendor$==&amp;amp;quot;Total&amp;amp;quot;"&amp;gt;
            &amp;lt;link&amp;gt;app/&amp;lt;myappname&amp;gt;/&amp;lt;MyTestDashboard&amp;gt;/form.Vendor=*&amp;lt;/link&amp;gt;
          &amp;lt;/condition&amp;gt;
          &amp;lt;condition&amp;gt;
            &amp;lt;link&amp;gt;app/&amp;lt;myappname&amp;gt;/&amp;lt;MyTestDashboard&amp;gt;/form.Vendor=$row.vendor$&amp;lt;/link&amp;gt;
          &amp;lt;/condition&amp;gt;
        &amp;lt;/drilldown&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to test out whether the tokens are being set properly instead of link you can use set or eval for the same and print out the token using html&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;eval token="SelectedField"&amp;gt;if($row.vendor=="Total","*",$row.vendor)&amp;lt;/eval&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is example of html section.&lt;BR /&gt;
          &lt;BR /&gt;
            Selected Field Name: $SelectedField$&lt;BR /&gt;
          &lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 17:35:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306891#M19551</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-02-17T17:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Drill-down from Total Row</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306892#M19552</link>
      <description>&lt;P&gt;Still ... the total is never triggered.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 19:34:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306892#M19552</guid>
      <dc:creator>splunkrocks2014</dc:creator>
      <dc:date>2017-02-17T19:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Drill-down from Total Row</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306893#M19553</link>
      <description>&lt;P&gt;I have attached a screenshot with Total clicked and some other value clicked and printed using the following code. Can you try the following code? Can you ensure that you have your field value being tested for row.vendor is placed under dollar sign? Also the double quote in condition block should be escaped as written in the query. Value of Total being matched is case sensitive so if you are printing Total in loswer case you should mention the same as $row.vendor$. (Field Names are always case sensitive, so make sure vendor is lower case not upper. Try out the following code as it should run anywhere(query is on Splunk's _internal index so as far as you have access to query the same it should work.)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     &amp;lt;panel&amp;gt;
       &amp;lt;table&amp;gt;
         &amp;lt;search&amp;gt;
           &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd
 | eval vendor=log_level
 | stats count by vendor
 | addcoltotals labelfield=vendor&amp;lt;/query&amp;gt;
           &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
           &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
           &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
         &amp;lt;/search&amp;gt;
         &amp;lt;drilldown&amp;gt;
           &amp;lt;condition match="$row.vendor$==&amp;amp;quot;Total&amp;amp;quot;"&amp;gt;
             &amp;lt;set token="myTest"&amp;gt;form.Vendor=*&amp;lt;/set&amp;gt;
           &amp;lt;/condition&amp;gt;
           &amp;lt;condition&amp;gt;
             &amp;lt;set token="myTest"&amp;gt;form.Vendor=$row.vendor$&amp;lt;/set&amp;gt;
           &amp;lt;/condition&amp;gt;
         &amp;lt;/drilldown&amp;gt;
         &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
         &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
         &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
         &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
         &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
         &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
         &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
       &amp;lt;/table&amp;gt;
       &amp;lt;html&amp;gt;
         &amp;lt;p&amp;gt;My Test Token=$myTest$&amp;lt;/p&amp;gt;
       &amp;lt;/html&amp;gt;
     &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Feb 2017 05:18:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306893#M19553</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-02-19T05:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Drill-down from Total Row</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306894#M19554</link>
      <description>&lt;P&gt;@splunkrocks2014 Were you able to try the example provided?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 05:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306894#M19554</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-02-21T05:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Drill-down from Total Row</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306895#M19555</link>
      <description>&lt;P&gt;Hi niketnilay, &lt;/P&gt;

&lt;P&gt;Thank you very much for your help.  &lt;/P&gt;

&lt;P&gt;I think I found the problem.  The root cause is we use the older version of Splunk (6.3.5) which does not work at all; however, it works perfectly for the version 6.5.2.  I have to look if there are any alternates.  Thanks again.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 15:22:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Custom-Drill-down-from-Total-Row/m-p/306895#M19555</guid>
      <dc:creator>splunkrocks2014</dc:creator>
      <dc:date>2017-02-21T15:22:11Z</dc:date>
    </item>
  </channel>
</rss>

