<?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: Create filter with month names in the dashboard in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574349#M47129</link>
    <description>&lt;P&gt;IT Whisperer, you are great !!!!&lt;BR /&gt;Thank you so much, in 2 minutes you solved a problem that I had not been able to overcome for days.&lt;BR /&gt;You're great !!!&lt;BR /&gt;Tks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Nov 2021 08:57:48 GMT</pubDate>
    <dc:creator>antonio147</dc:creator>
    <dc:date>2021-11-10T08:57:48Z</dc:date>
    <item>
      <title>Create filter with month names in the dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574335#M47123</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;i created a report, now i need to create a dashboard that takes data from this report with loadjob savedsearch.&lt;BR /&gt;the report has as the name of the fields 1_month_previous, 2_month_previous, ......(I could not rename the names of the months in the command stats sum (DIM) as 1_month_previous, I also followed a post here in the community)&lt;BR /&gt;I would like to create a filter in the dashboard with the names of the months instead of the previous_month.&lt;BR /&gt;I tried with this code:&lt;BR /&gt;&amp;lt;query&amp;gt; | makeresults&lt;BR /&gt;| eval MPR0 = strftime (relative_time (now (), "-0month @ month"), "% B")&lt;BR /&gt;| eval MPR1 = strftime (relative_time (now (), "-1month @ month"), "% B")&lt;BR /&gt;| eval MPR2 = strftime (relative_time (now (), "-2month @ month"), "% B")&lt;BR /&gt;| eval MPR3 = strftime (relative_time (now (), "-3month @ month"), "% B")&lt;BR /&gt;| eval MPR4 = strftime (relative_time (now (), "-4month @ month"), "% B")&lt;BR /&gt;| eval MPR5 = strftime (relative_time (now (), "-5month @ month"), "% B")&lt;BR /&gt;| eval MPR6 = strftime (relative_time (now (), "-6month @ month"), "% B")&lt;BR /&gt;| eval MPR7 = strftime (relative_time (now (), "-7month @ month"), "% B")&lt;BR /&gt;| eval MPR8 = strftime (relative_time (now (), "-8month @ month"), "% B")&lt;BR /&gt;| eval MPR9 = strftime (relative_time (now (), "-9month @ month"), "% B")&lt;BR /&gt;| eval MPR10 = strftime (relative_time (now (), "-10month @ month"), "% B")&lt;BR /&gt;| eval MPR11 = strftime (relative_time (now (), "-11month @ month"), "% B")&lt;/P&gt;&lt;P&gt;| eval MONTH = mvappend (MPR0, MPR1, MPR2, MPR3, MPR4, MPR5, MPR6, MPR7, MPR8, MPR9, MPR10, MPR11)&lt;BR /&gt;| table MONTH &amp;lt;/query&amp;gt;&lt;BR /&gt;but in Dinamic Option -&amp;gt; Search String by inserting this code, it returns me the names of the months separated by commas, all on a single row and not in a column to let me choose the month I need.&lt;BR /&gt;Do you have any suggestions?&lt;/P&gt;&lt;P&gt;I have tried mv append, split, delim, etc .. to no avail.&lt;BR /&gt;I ask for help from you Splunk gurus.&lt;BR /&gt;Tks&lt;BR /&gt;BR&lt;BR /&gt;Antonio&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 07:38:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574335#M47123</guid>
      <dc:creator>antonio147</dc:creator>
      <dc:date>2021-11-10T07:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create filter with month names in the dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574341#M47124</link>
      <description>&lt;P&gt;Here's a way that works&amp;nbsp; in SimpleXML - hopefully you can translate to Dashboard Studio&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;input type="dropdown" token="previousmonth"&amp;gt;
      &amp;lt;label&amp;gt;Past 12 months&amp;lt;/label&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;| makeresults
| eval month=mvrange(1, 13)
| mvexpand month
| eval month=0-month
| eval _time=relative_time(_time,month."mon@mon")
| eval month=strftime(_time,"%B")
| table month&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;month&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;month&amp;lt;/fieldForValue&amp;gt;
    &amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Nov 2021 08:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574341#M47124</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-10T08:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create filter with month names in the dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574343#M47126</link>
      <description>&lt;P&gt;Hi ITWhisperer,&lt;BR /&gt;thanks for the quick response.&lt;BR /&gt;I tried your code and it works.&lt;BR /&gt;I found another suggestion from you regarding this request that worked just the same.&lt;BR /&gt;Now, however, I would like the current month (now: November) to be in first place and the previous month immediately below, and so on .....&lt;BR /&gt;Also since I have the 1_month_previous field in the original report I have to take those values in that field.&lt;BR /&gt;I thought about transforming the name of the month into its value and adding the _precedent_month suffix so as to have the field written.&lt;BR /&gt;Do you think it is the optimal solution or is there something better? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;In any case, thanks for your invaluable help and suggestion.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 08:14:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574343#M47126</guid>
      <dc:creator>antonio147</dc:creator>
      <dc:date>2021-11-10T08:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create filter with month names in the dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574345#M47127</link>
      <description>&lt;LI-CODE lang="markup"&gt;    &amp;lt;input type="dropdown" token="previousmonth"&amp;gt;
      &amp;lt;label&amp;gt;Past 12 months&amp;lt;/label&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;| makeresults
| eval mon=mvrange(1, 13)
| mvexpand mon
| eval mon=mon-1
| eval month=if(mon&amp;gt;0,(0-mon)."mon","")
| eval fieldname=if(mon&amp;gt;0,mon."_month_previous","now")
| eval _time=relative_time(_time,month."@mon")
| eval month=strftime(_time,"%B")
| table month fieldname&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;month&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;fieldname&amp;lt;/fieldForValue&amp;gt;
    &amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Nov 2021 08:29:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574345#M47127</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-10T08:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create filter with month names in the dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574349#M47129</link>
      <description>&lt;P&gt;IT Whisperer, you are great !!!!&lt;BR /&gt;Thank you so much, in 2 minutes you solved a problem that I had not been able to overcome for days.&lt;BR /&gt;You're great !!!&lt;BR /&gt;Tks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 08:57:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Create-filter-with-month-names-in-the-dashboard/m-p/574349#M47129</guid>
      <dc:creator>antonio147</dc:creator>
      <dc:date>2021-11-10T08:57:48Z</dc:date>
    </item>
  </channel>
</rss>

