<?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: How to display date range from the time range dropdown selector in Dashboard Studio? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676330#M55381</link>
    <description>&lt;P&gt;Using addinfo gets the time from the time-picker i.e. the global time-picker in this instance, as a epoch time rather than what was selected, for example, if you chose last 5 minutes, the token would have "now" as the value for $global.latest$ rather than the epoch time equivalent for the current time.&lt;/P&gt;&lt;P&gt;If you want to use bold and other decorations, you might consider markup panels. and you might be able to use token values here.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2024 22:40:36 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-02-01T22:40:36Z</dc:date>
    <item>
      <title>How to display date range from the time range dropdown selector in Dashboard Studio?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676177#M55359</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;How to display date range from the time range dropdown selector in the Dashboard Studio?&lt;BR /&gt;Thank you for your help&lt;BR /&gt;I am currently using Visualization Type " Table" and create data configuration with the following search:&lt;BR /&gt;info_min_time &amp;amp; info_max_time gave me duplicate data for each row and I had to use dedup&lt;BR /&gt;&lt;BR /&gt;Is this a proper way to do it?&lt;BR /&gt;Is there a way to use the time token ($timetoken.earliest$ or $timetoken.latest$) from the time range dropdown selector in the search from data configuration (not in XML)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test
| addinfo
| eval info_min_time="From: ". strftime(info_min_time,"%b %d %Y %H:%M:%S")
| eval info_max_time="To: ". strftime(info_max_time,"%b %d %Y %H:%M:%S")
| dedup info_min_time, info_max_time
| table info_min_time, info_max_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 22:49:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676177#M55359</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-01-31T22:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to display date range from the time range dropdown selector in Dashboard Studio?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676213#M55367</link>
      <description>&lt;LI-CODE lang="markup"&gt;{
	"visualizations": {
		"viz_1putkd4H": {
			"type": "splunk.table",
			"options": {},
			"dataSources": {
				"primary": "ds_P8DuhImO"
			}
		}
	},
	"dataSources": {
		"ds_P8DuhImO": {
			"type": "ds.search",
			"options": {
				"query": "| makeresults\n| fields - _time\n| addinfo\n| rename info_min_time as earliest\n| rename info_max_time as latest\n| fieldformat earliest=strftime(earliest,\"%F %T\")\n| fieldformat latest=strftime(latest,\"%F %T\")\n| table earliest latest"
			},
			"name": "time_selected"
		}
	},
	"defaults": {
		"dataSources": {
			"ds.search": {
				"options": {
					"queryParameters": {
						"latest": "$global_time.latest$",
						"earliest": "$global_time.earliest$"
					}
				}
			}
		}
	},
	"inputs": {
		"input_global_trp": {
			"type": "input.timerange",
			"options": {
				"token": "global_time",
				"defaultValue": "-24h@h,now"
			},
			"title": "Global Time Range"
		}
	},
	"layout": {
		"type": "absolute",
		"options": {
			"display": "auto-scale",
			"height": 1200
		},
		"structure": [
			{
				"item": "viz_1putkd4H",
				"type": "block",
				"position": {
					"x": 0,
					"y": 0,
					"w": 1200,
					"h": 90
				}
			}
		],
		"globalInputs": [
			"input_global_trp"
		]
	},
	"description": "",
	"title": "studio times"
}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Feb 2024 10:02:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676213#M55367</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-01T10:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to display date range from the time range dropdown selector in Dashboard Studio?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676327#M55379</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I changed the code to below to show "From and To" in the sample report below&lt;BR /&gt;1) Is there a way to change &lt;STRONG&gt;"From"&lt;/STRONG&gt; and &lt;STRONG&gt;"To"&lt;/STRONG&gt; as &lt;STRONG&gt;Bold font&lt;/STRONG&gt;, and leave the rest as regular font&lt;BR /&gt;2) Is it possible to just put the time token ($time.earliest) literally next to From in the dashboard?&amp;nbsp;&lt;BR /&gt;3) Does &lt;STRONG&gt;addinfo&lt;/STRONG&gt; obtain the data from &lt;STRONG&gt;makeresult&lt;/STRONG&gt;, so I don't need to use index and have multiple rows of &lt;STRONG&gt;info_min_time&lt;/STRONG&gt;?&lt;BR /&gt;Thank you for your help&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| fields - _time
| addinfo
| rename info_min_time as earliest
| rename info_max_time as latest
| fieldformat earliest="From: " . strftime(earliest,"%b %d %Y %H:%M:%S")
| fieldformat latest="To: ". strftime(latest,"%b %d %Y %H:%M:%S")
| table earliest latest&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LearningGuy_0-1706823438940.png" style="width: 796px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29218i8E9FB3AC3440A3EF/image-dimensions/796x162?v=v2" width="796" height="162" role="button" title="LearningGuy_0-1706823438940.png" alt="LearningGuy_0-1706823438940.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
	"visualizations": {
		"viz_1putkd4H": {
			"type": "splunk.table",
			"options": {
				"headerVisibility": "none",
				"backgroundColor": "transparent",
				"tableFormat": {
					"rowBackgroundColors": "&amp;gt; table | seriesByIndex(0) | pick(tableAltRowBackgroundColorsByBackgroundColor)",
					"headerBackgroundColor": "&amp;gt; backgroundColor | setColorChannel(tableHeaderBackgroundColorConfig)",
					"rowColors": "&amp;gt; rowBackgroundColors | maxContrast(tableRowColorMaxContrast)",
					"headerColor": "&amp;gt; headerBackgroundColor | maxContrast(tableRowColorMaxContrast)"
				}
			},
			"dataSources": {
				"primary": "ds_P8DuhImO"
			}
		},
		"viz_JKbWkEG0": {
			"type": "splunk.markdown",
			"options": {
				"markdown": ""
			}
		},
		"viz_c9htuqvf": {
			"type": "splunk.markdown",
			"options": {
				"markdown": "# Sample Report"
			}
		},
		"viz_lxib04FT": {
			"type": "splunk.rectangle"
		},
		"viz_Ba02NPRN": {
			"type": "splunk.rectangle",
			"options": {
				"fillColor": "#ffffff"
			}
		}
	},
	"dataSources": {
		"ds_P8DuhImO": {
			"type": "ds.search",
			"options": {
				"query": "| makeresults\n| fields - _time\n| addinfo\n| rename info_min_time as earliest\n| rename info_max_time as latest\n| fieldformat earliest=\"From: \" . strftime(earliest,\"%b %d %Y %H:%M:%S\")\n| fieldformat latest=\"To: \". strftime(latest,\"%b %d %Y %H:%M:%S\")\n| table earliest latest"
			},
			"name": "time_selected"
		}
	},
	"defaults": {
		"dataSources": {
			"ds.search": {
				"options": {
					"queryParameters": {
						"latest": "$global_time.latest$",
						"earliest": "$global_time.earliest$"
					}
				}
			}
		}
	},
	"inputs": {
		"input_global_trp": {
			"type": "input.timerange",
			"options": {
				"token": "global_time",
				"defaultValue": "-24h@h,now"
			},
			"title": "Global Time Range"
		}
	},
	"layout": {
		"type": "absolute",
		"options": {
			"display": "auto-scale",
			"height": 1200
		},
		"structure": [
			{
				"item": "viz_JKbWkEG0",
				"type": "block",
				"position": {
					"x": 170,
					"y": 110,
					"w": 300,
					"h": 300
				}
			},
			{
				"item": "viz_lxib04FT",
				"type": "block",
				"position": {
					"x": 10,
					"y": 0,
					"w": 1190,
					"h": 70
				}
			},
			{
				"item": "viz_c9htuqvf",
				"type": "block",
				"position": {
					"x": 520,
					"y": 20,
					"w": 290,
					"h": 50
				}
			},
			{
				"item": "viz_Ba02NPRN",
				"type": "block",
				"position": {
					"x": 10,
					"y": 70,
					"w": 1190,
					"h": 40
				}
			},
			{
				"item": "viz_1putkd4H",
				"type": "block",
				"position": {
					"x": 320,
					"y": 70,
					"w": 620,
					"h": 60
				}
			}
		],
		"globalInputs": [
			"input_global_trp"
		]
	},
	"description": "",
	"title": "studio times"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 21:44:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676327#M55379</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-02-01T21:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to display date range from the time range dropdown selector in Dashboard Studio?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676330#M55381</link>
      <description>&lt;P&gt;Using addinfo gets the time from the time-picker i.e. the global time-picker in this instance, as a epoch time rather than what was selected, for example, if you chose last 5 minutes, the token would have "now" as the value for $global.latest$ rather than the epoch time equivalent for the current time.&lt;/P&gt;&lt;P&gt;If you want to use bold and other decorations, you might consider markup panels. and you might be able to use token values here.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 22:40:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676330#M55381</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-01T22:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to display date range from the time range dropdown selector in Dashboard Studio?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676406#M55388</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;Is using makeresult same as using index, if my goal is only to obtain &lt;SPAN&gt;info_min_time and info_max_time from addinfo&lt;/SPAN&gt;?&lt;BR /&gt;&lt;BR /&gt;If I only use | addinfo without makeresults, why did it gave me a lot of results?&lt;BR /&gt;Thank you so much&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LearningGuy_0-1706892387909.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29229iD5F8F5E9DBD6AB97/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LearningGuy_0-1706892387909.png" alt="LearningGuy_0-1706892387909.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 16:46:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676406#M55388</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-02-02T16:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to display date range from the time range dropdown selector in Dashboard Studio?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676421#M55390</link>
      <description>&lt;P&gt;addinfo adds the info_* fields to all the events in the event pipeline i.e. what ever is returned by your index search. makeresults (by default) created a single event. This can be changed with the count parameter, e.g. makeresults count=10&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 18:22:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676421#M55390</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-02T18:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to display date range from the time range dropdown selector in Dashboard Studio?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676628#M55402</link>
      <description>&lt;P&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Using makeresult to pull the time is much faster than index since it only pulls a single event&lt;BR /&gt;&lt;BR /&gt;Is it possible to change the font type (bold), color and background in Visualization Type "Table"?&lt;BR /&gt;&lt;BR /&gt;Thanks again!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 17:56:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676628#M55402</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-02-05T17:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to display date range from the time range dropdown selector in Dashboard Studio?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676705#M55404</link>
      <description>&lt;P&gt;This is a different question - try searching answers for a relevant topic&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 09:02:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-date-range-from-the-time-range-dropdown-selector/m-p/676705#M55404</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-06T09:02:35Z</dc:date>
    </item>
  </channel>
</rss>

