<?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 Merge the rows and give different colors in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490497#M32143</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;
I am new to splunk. I have a requirement where I need to merge the rows in a table which are of repeating data and give different color to those merged rows. I explored alot but failed to get the answer. Can anyone please help me in this.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2019 04:00:30 GMT</pubDate>
    <dc:creator>anooshac</dc:creator>
    <dc:date>2019-11-27T04:00:30Z</dc:date>
    <item>
      <title>Merge the rows and give different colors</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490497#M32143</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I am new to splunk. I have a requirement where I need to merge the rows in a table which are of repeating data and give different color to those merged rows. I explored alot but failed to get the answer. Can anyone please help me in this.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 04:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490497#M32143</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2019-11-27T04:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Merge the rows and give different colors</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490498#M32144</link>
      <description>&lt;P&gt;@anooshac,&lt;BR /&gt;
What you mean by merging rows? Do you mean deleting the duplicates or making a multi value of the rows ?&lt;BR /&gt;
Would be great if you could provide some sample/dummy input and expected output (please mask confidential data)&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 05:32:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490498#M32144</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-11-27T05:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Merge the rows and give different colors</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490499#M32145</link>
      <description>&lt;P&gt;Yes. I want to delete the duplicates.&lt;BR /&gt;
Consider the table below which has 2 fields.&lt;BR /&gt;
Field1      Field2&lt;BR /&gt;
A.                        1&lt;BR /&gt;
A.                        1&lt;BR /&gt;
A.                        2&lt;BR /&gt;
B.                        3&lt;BR /&gt;
B.                        3&lt;BR /&gt;
B.                        2&lt;/P&gt;

&lt;P&gt;I want to avoid repetition of values and make the data appear in a single cell. And I want to give colors for rows which are being merged. I have merged the rows using streamstats but I am not getting how to color those merged cells. Please help me in this!&lt;BR /&gt;
 Sorry in the table which I have posted the data of field1 and field2 doesn't have gap.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 05:43:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490499#M32145</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2019-11-27T05:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Merge the rows and give different colors</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490500#M32146</link>
      <description>&lt;P&gt;@anooshac,&lt;/P&gt;

&lt;P&gt;Based on the example ,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"your search" |stats count as Merged by Field1,Field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should combine the rows by deleting duplicates and provides you a count of merged rows. Color of the cells can be set if Merged &amp;gt; 1&lt;/P&gt;

&lt;P&gt;Here is a run anywhere example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Merge Rows&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;|makeresults|eval field1="A A A B B B"|makemv field1|mvexpand field1
|appendcols [|makeresults|eval field2="1 1 2 3 3 2"|makemv field2|mvexpand field2]
|stats count as Merged by field1,field2&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;format type="color" field="count"&amp;gt;
          &amp;lt;colorPalette type="list"&amp;gt;[#FFFFFF,#D93F3C,#D93F3C]&amp;lt;/colorPalette&amp;gt;
          &amp;lt;scale type="threshold"&amp;gt;2,1000&amp;lt;/scale&amp;gt;
        &amp;lt;/format&amp;gt;
        &amp;lt;format type="color" field="Merged"&amp;gt;
          &amp;lt;colorPalette type="list"&amp;gt;[#FFFFFF,#D93F3C]&amp;lt;/colorPalette&amp;gt;
          &amp;lt;scale type="threshold"&amp;gt;2&amp;lt;/scale&amp;gt;
        &amp;lt;/format&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Reference : &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/TableFormatsFormatting"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/TableFormatsFormatting&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you want to customize the table rendering, please have a look at the &lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;Dashboard Examples&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 05:59:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490500#M32146</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-11-27T05:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Merge the rows and give different colors</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490501#M32147</link>
      <description>&lt;P&gt;Thanks for the answer. Sorry but I don't want to get the count. I just want to make the above table to look like this.&lt;BR /&gt;
Field1 Field2&lt;BR /&gt;
 A            1&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;           2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;B.            3&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;           2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And for the field1 which is being merged with  cells I want to give different colors for different values. That is consider value"A" I want to give some color to those 3 cells which are being merged and for cells which are being merged with values "B" different color and so on. And I have alot of data in field1 as well as field2 this is just a dummy data.If you have some suggestions please help me . Thanks alot and really sorry for not explaining it properly.&lt;BR /&gt;
 I don't know why some values are in rectangular box. I am using my cell phone.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 06:23:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490501#M32147</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2019-11-27T06:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Merge the rows and give different colors</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490502#M32148</link>
      <description>&lt;P&gt;@anooshac ,&lt;/P&gt;

&lt;P&gt;Are you trying something similar to &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Merge Rows&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;|makeresults|eval field1="A A A B B B"|makemv field1|mvexpand field1
|appendcols [|makeresults|eval field2="1 1 2 3 3 2"|makemv field2|mvexpand field2]
|stats values(field2) as field2 by field1|nomv field2&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;format type="color" field="count"&amp;gt;
          &amp;lt;colorPalette type="list"&amp;gt;[#FFFFFF,#D93F3C,#D93F3C]&amp;lt;/colorPalette&amp;gt;
          &amp;lt;scale type="threshold"&amp;gt;2,1000&amp;lt;/scale&amp;gt;
        &amp;lt;/format&amp;gt;
        &amp;lt;format type="color" field="Merged"&amp;gt;
          &amp;lt;colorPalette type="list"&amp;gt;[#FFFFFF,#D93F3C]&amp;lt;/colorPalette&amp;gt;
          &amp;lt;scale type="threshold"&amp;gt;2&amp;lt;/scale&amp;gt;
        &amp;lt;/format&amp;gt;
        &amp;lt;format type="color" field="field2"&amp;gt;
          &amp;lt;colorPalette type="map"&amp;gt;&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;
        &amp;lt;format type="color" field="field1"&amp;gt;
          &amp;lt;colorPalette type="map"&amp;gt;{"A":#65A637,"B":#A2CC3E}&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 07:06:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Merge-the-rows-and-give-different-colors/m-p/490502#M32148</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-11-27T07:06:48Z</dc:date>
    </item>
  </channel>
</rss>

