<?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: Getting transaction results in table with &amp;quot;transacted&amp;quot; items in separate rows in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597465#M208011</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;. Trying it out in prod before I mark resolved.&lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2022 18:30:02 GMT</pubDate>
    <dc:creator>splunk_thunk</dc:creator>
    <dc:date>2022-05-11T18:30:02Z</dc:date>
    <item>
      <title>How to get transaction results in table with "transacted" items in separate rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597203#M207909</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;I have a transaction query that I am displaying in a table. I am able to get results in a table, however, the results tied in a single transaction appear as single row in the table. I would like to have them displayed in separate rows, as if they are individual search results.&lt;/P&gt;
&lt;P&gt;Here's an example:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Log Data:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Transaction Id=1, &lt;EM&gt;step&lt;/EM&gt;=1, &lt;EM&gt;data_x&lt;/EM&gt;=dataX1, &lt;EM&gt;data_y&lt;/EM&gt;=dataY1&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Transaction Id=1, &lt;EM&gt;step&lt;/EM&gt;=2, &lt;EM&gt;data_x&lt;/EM&gt;=dataX2, &lt;EM&gt;data_y&lt;/EM&gt;=dataY2&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How results look like&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;Transaction Id&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;data_x&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;data_y&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;
&lt;P&gt;dataX1&lt;/P&gt;
&lt;P&gt;dataX2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;
&lt;P&gt;dataY1&lt;/P&gt;
&lt;P&gt;dataY2&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;...&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;...&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Need it to look like&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;Transaction Id&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;data_x&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;data_y&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;dataX1&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;dataY1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;1&lt;/TD&gt;
&lt;TD height="25px"&gt;dataX2&lt;/TD&gt;
&lt;TD height="25px"&gt;dataY2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;2&lt;/TD&gt;
&lt;TD height="25px"&gt;...&lt;/TD&gt;
&lt;TD height="25px"&gt;...&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;2&lt;/TD&gt;
&lt;TD height="25px"&gt;...&lt;/TD&gt;
&lt;TD height="25px"&gt;...&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help appreciated.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 19:45:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597203#M207909</guid>
      <dc:creator>splunk_thunk</dc:creator>
      <dc:date>2022-05-10T19:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Getting transaction results in table with "transacted" items in separate rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597210#M207911</link>
      <description>&lt;P&gt;Please share the SPL that produces the current results.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 15:29:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597210#M207911</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-05-10T15:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting transaction results in table with "transacted" items in separate rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597232#M207918</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| makeresults count=4&lt;BR /&gt;| streamstats count&lt;BR /&gt;| eval transactionId = case(count=1 OR count=2, 1, count=3 OR count=4, 2) | eval step = case(transactionId=1 AND count&amp;lt;=2,count, transactionId=2,count-2) | eval data_x="dataX".step | eval data_y="dataY".step | eval val=case(step=1,step,step&amp;gt;1,"null. So how to print value_1 here as well?") | transaction transactionId | table transactionId, step, val, data_x, data_y | sort transactionId&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try the above.&lt;/P&gt;&lt;P&gt;I have another question (you will notice it in search results from above query). For the same transaction, how can I print the value of a field from step=1 of the transaction into other steps in the result, when that field is not available in the other search results within same transaction.&lt;/P&gt;&lt;P&gt;Thanks much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 18:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597232#M207918</guid>
      <dc:creator>splunk_thunk</dc:creator>
      <dc:date>2022-05-10T18:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Getting transaction results in table with "transacted" items in separate rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597239#M207921</link>
      <description>&lt;P&gt;I assume you used transaction to gather the events together so you could try using stats and list()&lt;/P&gt;&lt;P&gt;The main thing you need to do is zip all the fields together, mvexpand, then "unzip" them. This does rely on there being values in each of the fields, although that would be true for transaction as well&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=4
| streamstats count
| eval transactionId = case(count=1 OR count=2, 1, count=3 OR count=4, 2) | eval step = case(transactionId=1 AND count&amp;lt;=2,count, transactionId=2,count-2) | eval data_x="dataX".step | eval data_y="dataY".step | eval val=case(step=1,step,step&amp;gt;1,"null. So how to print value_1 here as well?")
| stats list(data_*) as data_* list(step) as step list(val) as val by transactionId
| eval data=mvzip(data_x,mvzip(data_y,val,":"),":")
| mvexpand data
| eval data_x=mvindex(split(data,":"),0)
| eval data_y=mvindex(split(data,":"),1)
| eval val=mvindex(split(data,":"),2)
| table transactionId data_x data_y val&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 10 May 2022 18:40:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597239#M207921</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-10T18:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Getting transaction results in table with "transacted" items in separate rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597246#M207924</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;. That solves one problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions to copy value from step-1 of the transaction into step-2 of the same transaction when it is missing in step-2?&lt;/P&gt;&lt;P&gt;I have added&amp;nbsp; this table to a dashboard that has filter on val from my example. When val field is not available in step-2 of the same transaction, the filter condition removes that result from the table, which is not desired.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 19:12:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597246#M207924</guid>
      <dc:creator>splunk_thunk</dc:creator>
      <dc:date>2022-05-10T19:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Getting transaction results in table with "transacted" items in separate rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597262#M207929</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults count=4
| streamstats count
| eval transactionId = case(count=1 OR count=2, 1, count=3 OR count=4, 2) | eval step = case(transactionId=1 AND count&amp;lt;=2,count, transactionId=2,count-2) | eval data_x="dataX".step | eval data_y="dataY".step | eval val=case(step=1,step,step&amp;gt;1,null())
| streamstats latest(val) as val by transactionId
| stats list(data_*) as data_* list(step) as step list(val) as val by transactionId
| eval data=mvzip(data_x,mvzip(data_y,val,":"),":")
| mvexpand data
| eval data_x=mvindex(split(data,":"),0)
| eval data_y=mvindex(split(data,":"),1)
| eval val=mvindex(split(data,":"),2)
| table transactionId data_x data_y val&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 10 May 2022 22:06:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597262#M207929</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-10T22:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting transaction results in table with "transacted" items in separate rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597465#M208011</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;. Trying it out in prod before I mark resolved.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 18:30:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-transaction-results-in-table-with-quot-transacted/m-p/597465#M208011</guid>
      <dc:creator>splunk_thunk</dc:creator>
      <dc:date>2022-05-11T18:30:02Z</dc:date>
    </item>
  </channel>
</rss>

