Dashboards & Visualizations

Display and hide column based on dropdown value

Path Finder

Hi all,

I have a dropdown field that is used to filter the results of a pivot table. Is there a way that I can show and hide a column in the pivot table?

For instance, say the token of the dropdown field is 'select_field_1'

('version' and 'daysRemaining' are columns)

Id imagine there is a conditional command where you can do if ($select_field_1|s$=certificate,show daysRemaining hide version)

Any help would be greatly appreciated!

Labels (2)
0 Karma

Path Finder


Can you try the below solution?

Here based on input value we can give the fields to be dispalyed.

  <label>Test Dashboard</label>
  <fieldset submitButton="false">
    <input type="time" token="time_token" searchWhenChanged="true">
      <label>Time Range</label>
    <input type="dropdown">
      <label>Select Sourcetype</label>
        <query>index="_internal" | dedup  sourcetype | table sourcetype</query>
      <choice value="*">All</choice>
        <condition match="$value$==&quot;mongod&quot; OR $value$==&quot;scheduler&quot;">
          <set token="display_fields">| table source, sourcetype, host, date_hour, date_mday</set>
        <condition match="$value$==&quot;splunkd&quot; OR $value$==&quot;splunkd_access&quot;">
          <set token="display_fields">| table source, sourcetype, host, date_minute, date_month</set>
        <condition match="$value$==&quot;*&quot;">
          <set token="display_fields">| table source, sourcetype, host</set>
          <query>index="_internal" | dedup source, sourcetype $display_fields$</query>
        <option name="drilldown">none</option>

below solution?


0 Karma
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!