<?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 create fields dynamically in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-fields-dynamically/m-p/578953#M201777</link>
    <description>&lt;P&gt;Can you give some sample events showing the issues you are dealing with?&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 17:39:11 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-12-20T17:39:11Z</dc:date>
    <item>
      <title>How to create fields dynamically</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-fields-dynamically/m-p/578928#M201768</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I have events which contain 3 Fields: "StartDate", "Value_per_month" and "Nr_of_Month". They basically disclose some monthly financial flow which beginns at "StartDate" and ends after "Nr_of_Month".&lt;BR /&gt;The goal is to show a sum of "Value_per_month" for each month over all events.&lt;BR /&gt;&lt;BR /&gt;In most cases the dates are in the future, so it will be a bit tricky to get this to work. However, at least a table view would be great and use some basic vizualisation on top. I thought I could create fields for each month, for example "value_yyyy-mm" and assign the value to each and then sum up the values in each field accross all events.&lt;BR /&gt;However I have not found a way to do this dynamically in a loop for X times, based on variable "Nr_of_Month".&lt;BR /&gt;I have checked combinations of eval, makeresults, foreach, gentimes, etc.&lt;BR /&gt;&lt;BR /&gt;Any basic idea how to approach this would be welcome.&lt;BR /&gt;Many thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 14:22:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-fields-dynamically/m-p/578928#M201768</guid>
      <dc:creator>wolfgangs</dc:creator>
      <dc:date>2021-12-20T14:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create fields dynamically</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-fields-dynamically/m-p/578953#M201777</link>
      <description>&lt;P&gt;Can you give some sample events showing the issues you are dealing with?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 17:39:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-fields-dynamically/m-p/578953#M201777</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-12-20T17:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create fields dynamically</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-fields-dynamically/m-p/578973#M201788</link>
      <description>&lt;P&gt;of course an example might tell more than a page of explanation, sorry for not adding initially &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;imagine several contracts with monthly payment, one contract per event. First one runs for 6 month, second for 4 month&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;StartDate&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Value of Month&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Nr_of month&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;event 1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;5th Dec 2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;3.5&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;event 2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;8th Jan 2022&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1.5&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my thoughts to add fields:&lt;/P&gt;&lt;TABLE border="1" width="80%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="10%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;2021-12&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;2022-01&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;2022-02&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;2022-03&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;2022-04&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;2022-05&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%" height="25px"&gt;event 1&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;3.5&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;3.5&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;3.5&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;3.5&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;3.5&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;3.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="10%" height="25px"&gt;event 2&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;not existing&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;1.5&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;1.5&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;1.5&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;1.5&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;not existing&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;expected result:&lt;BR /&gt;I would like to see the payment to expect each month&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Month&lt;/TD&gt;&lt;TD width="50%"&gt;sum of Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2021-12&lt;/TD&gt;&lt;TD width="50%"&gt;3.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2022-01&lt;/TD&gt;&lt;TD width="50%"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2022-02&lt;/TD&gt;&lt;TD width="50%"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2022-03&lt;/TD&gt;&lt;TD width="50%"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2022-04&lt;/TD&gt;&lt;TD width="50%"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;2022-05&lt;/TD&gt;&lt;TD width="50%"&gt;3.5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 19:44:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-fields-dynamically/m-p/578973#M201788</guid>
      <dc:creator>wolfgangs</dc:creator>
      <dc:date>2021-12-20T19:44:49Z</dc:date>
    </item>
  </channel>
</rss>

