<?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: piechart drilldown in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342224#M40523</link>
    <description>&lt;P&gt;like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     &amp;lt;drilldown&amp;gt;
       &amp;lt;link target="_blank"&amp;gt;&amp;lt;set token="tokDays"&amp;gt;$click.value$&amp;lt;/set&amp;gt; &amp;lt;/link&amp;gt;
     &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 20 Nov 2017 12:54:26 GMT</pubDate>
    <dc:creator>Mike6960</dc:creator>
    <dc:date>2017-11-20T12:54:26Z</dc:date>
    <item>
      <title>piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342210#M40509</link>
      <description>&lt;P&gt;I have read a lot of other questions about this matter but i just can't get it running.&lt;BR /&gt;
Ik have this search":&lt;BR /&gt;
index=xxxx &lt;BR /&gt;
 | stats values earliest(G_S) AS G_S values earliest(A_Z) AS A_Z values earliest(D_A) AS D_A_I count by ZMV &lt;BR /&gt;
 | eval eG_S=strptime(G_S,"%Y-%m-%d %H:%M:%S.%N"), eA_Z=strptime(A_Z, "%Y-%m-%d %H:%M:%S.%N")&lt;BR /&gt;&lt;BR /&gt;
 | eval eD_A_I=coalesce(strptime(D_A_I, "%Y-%m-%d %H:%M:%S.%N"),now())&lt;BR /&gt;
 | eval days=floor((eD_A_I-eA_Z)/86400)&lt;BR /&gt;
 | stats count as daycount by days |eval days = abs(days)&lt;BR /&gt;
 | eval days = if(days&amp;lt;=14,"Binnen KPI","Buiten KPI")&lt;BR /&gt;
 | stats sum(daycount) as daycount by days&lt;BR /&gt;
The results are presented in a piechart, when i click i want to see the individual events. I have tried to do this with a token but i am stuck (again) . We are running version 6.5.2 &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:32:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342210#M40509</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2020-09-29T16:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342211#M40510</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Can you please use below pie chart drilldown example??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal  | stats count as AA by sourcetype&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&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;option name="charting.chart"&amp;gt;pie&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;link target="_blank"&amp;gt;search?earliest=$earliest$&amp;amp;amp;latest=$latest$&amp;amp;amp;q= index=_internal sourcetype="$click.value$" &amp;lt;/link&amp;gt;
        &amp;lt;/drilldown&amp;gt;
      &amp;lt;/chart&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know for other drilldown help.&lt;/P&gt;

&lt;P&gt;Happy Splunking &lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 17:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342211#M40510</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2017-11-02T17:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342212#M40511</link>
      <description>&lt;P&gt;Hi, i dont think i understand your answer. Where do i put my search and where do i define which search splunk needs to execute when i click on the piechart?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 17:19:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342212#M40511</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-11-02T17:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342213#M40512</link>
      <description>&lt;P&gt;sadly, this does not work, i replaced my own link for your suggested one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;drilldown&amp;gt;
       &amp;lt;link target="_blank"&amp;gt;search?earliest=$earliest$&amp;amp;amp;latest=$latest$&amp;amp;amp;q= index=_internal sourcetype="$click.value$" &amp;lt;/link&amp;gt;
     &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But this does not work&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 07:21:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342213#M40512</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-11-06T07:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342214#M40513</link>
      <description>&lt;P&gt;@Mike6960, I am not sure about the syntax &lt;CODE&gt;| stats values earliest(G_S) AS G_S ...&lt;/CODE&gt; may be it is a typo. However, I would like to point that the slices for your pie chart are based on data you calculate in your query hence the same is not available in your base search or raw event. This implies when you perform your drilldown you can present the values calculated in your first stats command not the raw events. &lt;/P&gt;

&lt;P&gt;If following is your base search (PS: for saving as dashboard you would need to escape greater  than &lt;CODE&gt;&amp;gt;&lt;/CODE&gt; and less than &lt;CODE&gt;&amp;lt;&lt;/CODE&gt; symbols using &lt;CODE&gt;&amp;amp;gt;&lt;/CODE&gt; and &lt;CODE&gt;&amp;amp;lt;&lt;/CODE&gt; respectively). &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xxxx 
| stats earliest(G_S) AS G_S earliest(A_Z) AS A_Z earliest(D_A) AS D_A_I count by ZMV 
| eval eG_S=strptime(G_S,"%Y-%m-%d %H:%M:%S.%N"), eA_Z=strptime(A_Z, "%Y-%m-%d %H:%M:%S.%N") 
| eval eD_A_I=coalesce(strptime(D_A_I, "%Y-%m-%d %H:%M:%S.%N"),now())
| eval days=floor((eD_A_I-eA_Z)/86400)
| stats count(eva(abs(days&amp;lt;=14))) as "Binnen KPI" count(eva(abs(days&amp;gt;14))) as "Buiten KPI" by days 
| transpose column_name="days"
|  rename "row 1" as count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can create the following drilldown token:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;drilldown&amp;gt;
      &amp;lt;set token="tokDays"&amp;gt;$click.value$&amp;lt;/set&amp;gt;
    &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then pass the same on to another &lt;CODE&gt;panel&lt;/CODE&gt; with &lt;CODE&gt;table&lt;/CODE&gt; visualization using &lt;CODE&gt;tokDays&lt;/CODE&gt;. (PS: for saving as dashboard you would need to escape less than &lt;CODE&gt;&amp;lt;&lt;/CODE&gt; symbols using &lt;CODE&gt;&amp;amp;lt;&lt;/CODE&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xxxx 
| stats earliest(G_S) AS G_S earliest(A_Z) AS A_Z earliest(D_A) AS D_A_I count by ZMV 
| eval eG_S=strptime(G_S,"%Y-%m-%d %H:%M:%S.%N"), eA_Z=strptime(A_Z, "%Y-%m-%d %H:%M:%S.%N") 
| eval eD_A_I=coalesce(strptime(D_A_I, "%Y-%m-%d %H:%M:%S.%N"),now())
| eval days=floor((eD_A_I-eA_Z)/86400)
|  eval days = abs(days)
|  eval days = if(days&amp;lt;=14,"Binnen KPI","Buiten KPI")
|  search days="$tokDays$"
|  fieldformat eD_A_I=strftime(eD_A_I,"%Y-%m-%d %H:%M:%S.%N")
|  fieldformat eA_Z=strftime(eA_Z,"%Y-%m-%d %H:%M:%S.%N")
|  table log_level eD_A_I eA_Z days count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Nov 2017 09:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342214#M40513</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-06T09:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342215#M40514</link>
      <description>&lt;P&gt;Ok, so actually what you are saying is that it is not possible? "If following is your base search.. " , this is not my search, because i need a piechart with two values. Do i understand you correctly when i say that you suggest to make a new panel to show the results??&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 10:15:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342215#M40514</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-11-06T10:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342216#M40515</link>
      <description>&lt;P&gt;Ok, sorry, note to myself not to be impatient. I've used my own search, used your token answer and added a new panel. Is it possible to only show the panel when the token has a value, so only when the piechart is clicked?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 10:49:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342216#M40515</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-11-06T10:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342217#M40516</link>
      <description>&lt;P&gt;Yes you can use &lt;CODE&gt;depends&lt;/CODE&gt; attribute with token which can toggle display based on whether it is set or not. The &lt;CODE&gt;depends&lt;/CODE&gt; attribute can be applied to dashboard's input or visualization elements like &lt;CODE&gt;&amp;lt;row&amp;gt;&lt;/CODE&gt;, &lt;CODE&gt;&amp;lt;panel&amp;gt;&lt;/CODE&gt;, &lt;CODE&gt;&amp;lt;table&amp;gt;&lt;/CODE&gt;,&lt;CODE&gt;&amp;lt;chart&amp;gt;&lt;/CODE&gt; etc. whichever you need to toggle with corresponding token.&lt;/P&gt;

&lt;P&gt;Following is the snippet for your drilldown table where entire row can be hidden with depends:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row depends="$tokDays$"&amp;gt;   
   &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Drilldown Table For ($tokDays$)&amp;lt;/title&amp;gt;
      &amp;lt;table&amp;gt;
      &amp;lt;search&amp;gt;
         &amp;lt;query&amp;gt;....
          ....
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Nov 2017 14:01:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342217#M40516</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-06T14:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342218#M40517</link>
      <description>&lt;P&gt;Whichever fields from your event data you are interested in you can use &lt;CODE&gt;values(&amp;lt;yourFieldName&amp;gt;)&lt;/CODE&gt; or &lt;CODE&gt;list(&amp;lt;yourFieldName&amp;gt;)&lt;/CODE&gt; in your &lt;CODE&gt;first stats&lt;/CODE&gt; command on the second line of SPL. Once you do table drilldown they will also be displayed (as multivalued if they have multiple values and you are using values() or list()). Don't forget the add the additional field in the final &lt;CODE&gt;table&lt;/CODE&gt; command of drilldown query.&lt;/P&gt;

&lt;P&gt;Refer to various statistical methods for their purpose and differences, so that you can use the one you need appropriately: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonStatsFunctions#Types_of_statistical_and_charting_functions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonStatsFunctions#Types_of_statistical_and_charting_functions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;PS: More fields you include in first stats command more performance impact it will have. So try to retain only those which are necessary.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 14:09:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342218#M40517</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-06T14:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342219#M40518</link>
      <description>&lt;P&gt;The stats in my search i use to get the earliest dates, i would not know another way to accomplish this. Thank you for all your help. I will never really get splunk I am afraid. I am just getting by by google en splunk answers...&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 15:06:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342219#M40518</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-11-06T15:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342220#M40519</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;Can you share your sample XML code ?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 16:05:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342220#M40519</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2017-11-06T16:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342221#M40520</link>
      <description>&lt;P&gt;Hai niketnilay,&lt;/P&gt;

&lt;P&gt;Another question, what if i want to open a new page for the results instead of a panel &lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 10:24:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342221#M40520</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-11-20T10:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342222#M40521</link>
      <description>&lt;P&gt;@Mike6960, you would need to use &lt;CODE&gt;&amp;lt;link target="_blank"&amp;gt;&lt;/CODE&gt; as others have suggested. The code inside the &lt;CODE&gt;drilldown link&lt;/CODE&gt; will vary as per what is your target, whether it is search or another dashboard within Splunk or some external link altogether.&lt;/P&gt;

&lt;P&gt;You can refer to documentation for various drilldown link options: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/DrilldownIntro#Choose_a_drilldown_action"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/DrilldownIntro#Choose_a_drilldown_action&lt;/A&gt;&lt;BR /&gt;
PS: If you are on Splunk Enterprise 6.6 or higher, basic drilldown options would be available in UI through Edit Panel option (no coding required).&lt;/P&gt;

&lt;P&gt;You can also get Splunk Dashboard Examples App from Splunkbase for going through examples showcasing the drilldown options: &lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;https://splunkbase.splunk.com/app/1603/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 12:31:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342222#M40521</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-20T12:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342223#M40522</link>
      <description>&lt;P&gt;Thank you, since last weekend we run version 7. But in the drilldowneditor its still required to work with tokens, this is quite challenging for me&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 12:47:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342223#M40522</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-11-20T12:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: piechart drilldown</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342224#M40523</link>
      <description>&lt;P&gt;like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     &amp;lt;drilldown&amp;gt;
       &amp;lt;link target="_blank"&amp;gt;&amp;lt;set token="tokDays"&amp;gt;$click.value$&amp;lt;/set&amp;gt; &amp;lt;/link&amp;gt;
     &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Nov 2017 12:54:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/piechart-drilldown/m-p/342224#M40523</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2017-11-20T12:54:26Z</dc:date>
    </item>
  </channel>
</rss>

