<?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: SPL dynamic range in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698444#M57252</link>
    <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;said (and does the articles he referenced, and many others on this subject), your calculation to determine the colour should be done in SPL, so try modifying your search accordingly.&lt;/P&gt;</description>
    <pubDate>Sat, 07 Sep 2024 09:23:36 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-09-07T09:23:36Z</dc:date>
    <item>
      <title>SPL dynamic range</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698414#M57249</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a quick question based on this kind of data.&lt;/P&gt;&lt;P&gt;consider this table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Age	sex	id	^N-S-Ba	S-N mm
17	male	1	125	84
17	female	2	133	75&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to create a dynamic range for the field "S-N mm"&lt;BR /&gt;for the female is from 74,6&amp;nbsp; to 77&lt;/P&gt;&lt;P&gt;for the male is from 79,3 to 87,7&lt;BR /&gt;I need to create a table that when one of these values ​​is within range it should turn green&lt;/P&gt;&lt;P&gt;thanks for the support&lt;/P&gt;&lt;P&gt;Ale&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 16:13:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698414#M57249</guid>
      <dc:creator>asabatini</dc:creator>
      <dc:date>2024-09-06T16:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: SPL dynamic range</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698417#M57250</link>
      <description>&lt;P&gt;I'm assuming this is in a dashboard.&lt;/P&gt;&lt;P&gt;If you are using simple XML you can do this using the technique described in these links below. As you need to colour the cell based on dependency of data elsewhere (male/female) you need to calculate the colour you want in the SPL and then make the S-N mm field a multivalue field and then use the expression type of syntax.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-color-of-row-based-on-cell-value-in-splunk/m-p/525471/highlight/true#M35637" target="_blank"&gt;https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-color-of-row-based-on-cell-value-in-splunk/m-p/525471/highlight/true#M35637&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-color-of-a-table-row-if-the-response-time-is/m-p/678151/highlight/true#M55537" target="_blank"&gt;https://community.splunk.com/t5/Dashboards-Visualizations/Changing-the-color-of-a-table-row-if-the-response-time-is/m-p/678151/highlight/true#M55537&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Dashboards-Visualizations/How-color-a-field-by-other-value-in-XML/m-p/671094/highlight/true#M54930" target="_blank"&gt;https://community.splunk.com/t5/Dashboards-Visualizations/How-color-a-field-by-other-value-in-XML/m-p/671094/highlight/true#M54930&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 16:28:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698417#M57250</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-09-06T16:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: SPL dynamic range</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698431#M57251</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried our suggestion&amp;nbsp; but doesn't works maybe I wrong something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard version="1.1" theme="light"&amp;gt;
  &amp;lt;label&amp;gt;ID patient&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html depends="$hidden$"&amp;gt;
        &amp;lt;style&amp;gt;
          #coloured_cell table tbody td div.multivalue-subcell[data-mv-index="0"]{
            display: none;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
      &amp;lt;table id="coloured_cell"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;sourcetype=csv 
| eval value=mvappend(sex,'S_N mm')
| table Age id sex "S_N mm" N_S_Ba value&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;&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;row&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="number" field="id"&amp;gt;&amp;lt;/format&amp;gt;
        &amp;lt;format type="color" field="value"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;case(mvindex(value, 1) &amp;amp;gt;"79" AND mvindex(value, 0) == "male","#00FF00")&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;/LI-CODE&gt;</description>
      <pubDate>Fri, 06 Sep 2024 21:03:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698431#M57251</guid>
      <dc:creator>asabatini</dc:creator>
      <dc:date>2024-09-06T21:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: SPL dynamic range</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698444#M57252</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;said (and does the articles he referenced, and many others on this subject), your calculation to determine the colour should be done in SPL, so try modifying your search accordingly.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Sep 2024 09:23:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698444#M57252</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-09-07T09:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: SPL dynamic range</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698446#M57253</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok this method works fine,&amp;nbsp;I'll explain what I did.&lt;/P&gt;&lt;P&gt;first I created a multivalue field with "sex, and S_n_mm"&amp;nbsp; fields.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval value=mvappend(sex,'S_N mm')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after this I created the condition directly on the XML code dashboard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color" field="value"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;case(mvindex(value, 1) &amp;amp;gt;"79" AND mvindex(value, 0) == "male","#00FF00",mvindex(value, 1) &amp;amp;gt;"74" AND mvindex(value, 0) == "female","#00FF00")&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 07 Sep 2024 11:23:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/SPL-dynamic-range/m-p/698446#M57253</guid>
      <dc:creator>asabatini</dc:creator>
      <dc:date>2024-09-07T11:23:51Z</dc:date>
    </item>
  </channel>
</rss>

