<?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: Splunk Dashboard Studio - Markdown Text in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672727#M55100</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/65114"&gt;@madhav_dholakia&lt;/a&gt;&amp;nbsp;- Did this resolve your query? If yes then please mark the answer as "Accepted" for other community users.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Dec 2023 11:51:28 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2023-12-27T11:51:28Z</dc:date>
    <item>
      <title>Splunk Dashboard Studio - Markdown Text</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672478#M55077</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am creating a dashboard in Dashboard Studio and&amp;nbsp;wanted to have just 3 timeranges available for a user:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;Last Month ("-mon@mon" to "@mon")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Last to last Month ("-2mon@mon" to "-mon@mon")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Month to date ("@mon" to "@d")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I think I can get all these options in the default timerange input as well, but I do not want User to select anything other than these 3 options - and this is something I cannot prevent when using default timerange input (or at least I am not sure how do I do that, until and unless I create a separate user role with specific time ranges allowed, may be).&lt;/P&gt;&lt;P&gt;so as a work around, I have created a drop down with these 3 token labels and values are set in form of relative_time function, i.e.,&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;where tempDt&amp;gt;=relative_time(now(),"-mon@mon") and tempDt&amp;lt;relative_time(now(),"@mon")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;where tempDt&amp;gt;=relative_time(now(),"@mon") and tempDt&amp;lt;relative_time(now(),"@d")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;where tempDt&amp;gt;=relative_time(now(),"-2mon@mon") and tempDt&amp;lt;relative_time(now(),"-mon@mon")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;in the main search (not available on demo dashboard definition shared here) I am using a variable tempDt and then one of the token value will filter data based on this tempDt.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc earliest="-2mon@mon" 
```there exist a field called tempDt```
$timerange$&lt;/LI-CODE&gt;&lt;P&gt;All this worked as expected - no issues.&amp;nbsp;&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Now, I also want to display Month Name in Dashboard Header (created using Markdown Text) based on Token Value,&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;if Last Month then strftime(relative_time(now(),"-mon@mon"),"%b-%Y")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;if Last to last month then&amp;nbsp;strftime(relative_time(now(),"-2mon@mon"),"%b-%Y")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;if Month To Date then&amp;nbsp;strftime(relative_time(now(),"@mon"),"%b-%Y")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Please see below dashboard source code that I have tried but Markdown text is not populated with the Month Name - when I run the same search outside dashboard, it works ok.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;{
	"visualizations": {
		"viz_q7o2tu52": {
			"type": "splunk.markdown",
			"options": {
				"markdown": "### **Monthly Service Review ($MD Search:result.month$)**"
			}
		}
	},
	"dataSources": {
		"ds_zBQAeHol": {
			"type": "ds.search",
			"options": {
				"enableSmartSources": true,
				"query": "| makeresults \n| eval temp=case(LIKE($timerange|s$,\"%-2mon@mon%\"),\"-2mon@mon\",LIKE($timerange|s$,\"%-mon@mon%\"),\"-mon@mon\",LIKE($timerange|s$,\"%@d%\"),\"@mon\",true(),\"@d\")\n| eval epoch=relative_time(now(),$temp$)\n| eval month=strftime(epoch,\"%b-%Y\")\n| table month",
				"queryParameters": {
					"earliest": "-24h@h",
					"latest": "now"
				}
			},
			"name": "MD Search"
		}
	},
	"defaults": {
		"dataSources": {
			"ds.search": {
				"options": {
					"queryParameters": {
						"latest": "$global_time.latest$",
						"earliest": "$global_time.earliest$"
					}
				}
			}
		}
	},
	"inputs": {
		"input_global_trp": {
			"options": {
				"items": [
					{
						"label": "Last Month",
						"value": "where tempDt&amp;gt;=relative_time(now(),\"-mon@mon\") and tempDt&amp;lt;relative_time(now(),\"@mon\")"
					},
					{
						"label": "Month to Date",
						"value": "where tempDt&amp;gt;=relative_time(now(),\"@mon\") and tempDt&amp;lt;relative_time(now(),\"@d\")"
					},
					{
						"label": "Last to last Month",
						"value": "where tempDt&amp;gt;=relative_time(now(),\"-2mon@mon\") and tempDt&amp;lt;relative_time(now(),\"-mon@mon\")"
					}
				],
				"defaultValue": "where tempDt&amp;gt;=relative_time(now(),\"-mon@mon\") and tempDt&amp;lt;relative_time(now(),\"@mon\")",
				"token": "timerange"
			},
			"title": "Time Range",
			"type": "input.dropdown"
		}
	},
	"layout": {
		"type": "absolute",
		"options": {
			"width": 1440,
			"height": 960,
			"display": "auto"
		},
		"structure": [
			{
				"item": "input_global_trp",
				"type": "input",
				"position": {
					"x": 640,
					"y": 130,
					"w": 198,
					"h": 82
				}
			},
			{
				"item": "viz_q7o2tu52",
				"type": "block",
				"position": {
					"x": 540,
					"y": 30,
					"w": 400,
					"h": 90
				}
			}
		],
		"globalInputs": []
	},
	"description": "",
	"title": "MD Markdown Token Test"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="madhav_dholakia_0-1703135529815.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28621iF8E5E9077BF1DCCF/image-size/large?v=v2&amp;amp;px=999" role="button" title="madhav_dholakia_0-1703135529815.png" alt="madhav_dholakia_0-1703135529815.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can you please help how can I achieve this?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhav&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 05:13:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672478#M55077</guid>
      <dc:creator>madhav_dholakia</dc:creator>
      <dc:date>2023-12-21T05:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Studio - Markdown Text</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672651#M55092</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/65114"&gt;@madhav_dholakia&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Unfortunately, Splunk Dashboard Studio does not support a full set of features for Tokens like Simple XML dashboards. So I doubt if something like this complex requirement can be implemented.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try creating last months &lt;STRONG&gt;static&lt;/STRONG&gt;&amp;nbsp;in the dropdown, and that may work I think like, and then manually update the dashboard every month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!! Kindly upvote if it does!!!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Dec 2023 05:02:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672651#M55092</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2023-12-25T05:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Studio - Markdown Text</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672727#M55100</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/65114"&gt;@madhav_dholakia&lt;/a&gt;&amp;nbsp;- Did this resolve your query? If yes then please mark the answer as "Accepted" for other community users.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 11:51:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672727#M55100</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2023-12-27T11:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Studio - Markdown Text</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672812#M55106</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;- apologies for the delayes response. Yes, that static Month is already in place. I have got 35 dashboards having three different Time ranges available to select in the dropdown (Last Month, Last to Last Month, Month To Date) - so I am looking for the header to update based on the time range selected.&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;if I run this report today for "Last Month" - Report Title would be Monthly Report - Nov 2023&amp;nbsp;&lt;/P&gt;&lt;P&gt;if I run this report today for "Last to last Month" - Report Title would be Monthly Report - Oct 2023&amp;nbsp;&lt;/P&gt;&lt;P&gt;if I run this report today for "Month to date" - Report Title would be Monthly Report - Dec 2023&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 06:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672812#M55106</guid>
      <dc:creator>madhav_dholakia</dc:creator>
      <dc:date>2023-12-28T06:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Studio - Markdown Text</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672830#M55110</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/65114"&gt;@madhav_dholakia&lt;/a&gt;&amp;nbsp;- Got it. I don't think that level of token manipulation is possible on Dashboard Studio.&lt;/P&gt;&lt;P&gt;You can try Simple XML for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!~!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 13:16:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/672830#M55110</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2023-12-28T13:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Studio - Markdown Text</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/673148#M55119</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In my data source, after making changes as below - this worked as expected.&lt;BR /&gt;&lt;BR /&gt;This was suggested by Camden Marchetti in Slack Splunk Usergroup.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;From:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval epoch=relative_time(now(),$temp$)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;To:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval epoch=relative_time(now(),$$temp$$)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Thank you very much for your inputs on this as well as my other questions in this forum.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 16:31:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-Dashboard-Studio-Markdown-Text/m-p/673148#M55119</guid>
      <dc:creator>madhav_dholakia</dc:creator>
      <dc:date>2024-01-03T16:31:33Z</dc:date>
    </item>
  </channel>
</rss>

