<?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 How to compare two fields values counts ? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683273#M55910</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;In my scenario i want to compare two column values .If its match its fine if the values is in difference i want to display both the field values in some colour in the splunk dashboard.&lt;/P&gt;&lt;TABLE border="1" width="25%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;Field1&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;Field2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;28&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;28&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;&lt;FONT color="#99CC00"&gt;100&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;FONT color="#99CC00"&gt;99&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;&lt;FONT color="#99CC00"&gt;33&lt;/FONT&gt;&lt;/TD&gt;&lt;TD height="24px"&gt;&lt;FONT color="#99CC00"&gt;56&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;&lt;FONT color="#000000"&gt;18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD height="24px"&gt;&lt;FONT color="#000000"&gt;18&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Thu, 04 Apr 2024 15:09:42 GMT</pubDate>
    <dc:creator>karthi2809</dc:creator>
    <dc:date>2024-04-04T15:09:42Z</dc:date>
    <item>
      <title>How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683273#M55910</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;In my scenario i want to compare two column values .If its match its fine if the values is in difference i want to display both the field values in some colour in the splunk dashboard.&lt;/P&gt;&lt;TABLE border="1" width="25%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;Field1&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;Field2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;28&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;28&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;&lt;FONT color="#99CC00"&gt;100&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;FONT color="#99CC00"&gt;99&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;&lt;FONT color="#99CC00"&gt;33&lt;/FONT&gt;&lt;/TD&gt;&lt;TD height="24px"&gt;&lt;FONT color="#99CC00"&gt;56&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;&lt;FONT color="#000000"&gt;18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD height="24px"&gt;&lt;FONT color="#000000"&gt;18&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 04 Apr 2024 15:09:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683273#M55910</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-04T15:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683280#M55911</link>
      <description>&lt;P&gt;One way is to use CSS and multivalue fields where the second value in the multivalue field is used to determine the colour&lt;/P&gt;&lt;P&gt;See the reply here for an example&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-color-the-columns-based-on-previous-column-value/m-p/538849#M152374" target="_blank"&gt;How to color the columns based on previous column... - Splunk Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 15:41:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683280#M55911</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-04T15:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683293#M55912</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;I want to compare two field values match.If does not match i want to colour both the fields.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="mulesoft" applicationName="s-concur-api" environment=PRD priority timestamp (tracePoint="EXCEPTION") OR
    ("Concur Ondemand Started*") OR (message="Expense Extract Process started for jobName :*") OR ("Before Calling flow archive-Concur*") OR (message="*(SUCCESS): Concur AP/GL Extract V*") OR (message="Records Count Validation*") OR (message="API: START: /v1/expense/extract/ondemand*" OR message="API: START: /v1/fin*") OR (message="Post - Expense Extract processing to Oracle*") OR (message="Concur AP/GL File/s Process Status") OR (message="*(ERROR):*") 
| search NOT message IN ("API: START: /v1/expense/extract/ondemand/accrual*") 
| spath content.payload{} 
| mvexpand content.payload{} 
| transaction correlationId 
| rename content.SourceFileName as SourceFileName content.JobName as JobName content.loggerPayload.archiveFileName AS ArchivedFileName content.payload{} as response content.Region as Region content.ConcurRunId as ConcurRunId content.HeaderCount as HeaderCount content.SourceFileDTLCount 
    as SourceFileDTLCount content.APRecordsCountStaged
    as APRecordsCountStaged content.GLRecordsCountStaged
    as GLRecordsCountStaged content.TotalAPGLRecordsCountStaged as TotalAPGLRecordsCountStaged 
    content.ErrorMsg as errorMessage content.errorMsg as error content.errorMsg as error "content.payload{}.AP Import flow processing results{}.requestID" as RequestID "content.payload{}.GL Import flow processing results{}.impConReqId" as ImpConReqId 
| rex field=message max_match=0 "Expense Extract Process started for (?&amp;lt;FileName&amp;gt;[^\n]+)" 
| rex field=message max_match=0 "API: START: /v1/expense/extract/ondemand/(?&amp;lt;OtherRegion&amp;gt;[^\/]+)\/(?&amp;lt;OnDemandFileName&amp;gt;\S+)" 
| eval OtherRegion=upper(OtherRegion) 
| eval OnDemandFileName=rtrim(OnDemandFileName,"Job") 
| eval "FileName/JobName"= coalesce(OnDemandFileName,JobName) 
| eval JobType=case(like('message',"%Concur Ondemand Started%"),"OnDemand",like('message',"%API: START: /v1/expense/extract/ondemand%"),"OnDemand",like('message',"Expense Extract Process started%"),"Scheduled") 
| eval Status=case(like('message' ,"%Concur AP/GL File/s Process Status%"),"SUCCESS", like('tracePoint',"%EXCEPTION%"),"ERROR") 
| eval Region= coalesce(Region,OtherRegion) 
| eval OracleRequestId=mvappend("RequestId:",RequestID,"ImpConReqid:",ImpConReqId) 
| eval CheckMatch = if(isnull(SourceFileDTLCount) OR isnull(TotalAPGLRecordsCountStaged), "not matched", "matched") 
| eventstats min(timestamp) AS Logon_Time, max(timestamp) AS Logoff_Time by correlationId 
| eval StartTime=round(strptime(Logon_Time, "%Y-%m-%dT%H:%M:%S.%QZ")) 
| eval EndTime=round(strptime(Logoff_Time, "%Y-%m-%dT%H:%M:%S.%QZ")) 
| eval ElapsedTimeInSecs=EndTime-StartTime 
| eval "Total Elapsed Time"=strftime(ElapsedTimeInSecs,"%H:%M:%S") 
| eval sign=if(SourceFileDTLCount == TotalAPGLRecordsCountStaged,"GREEN", "YELLOW") 
| rename Logon_Time as Timestamp 
| table Status JobType "FileName/JobName" Timestamp Region ConcurRunId HeaderCount SourceFileDTLCount APRecordsCountStaged GLRecordsCountStaged TotalAPGLRecordsCountStaged ArchivedFileName ElapsedTimeInSecs "Total Elapsed Time" OracleRequestId correlationId 
| join correlationId type=left 
    [ search index="mulesoft" applicationName="s-concur-api" (message="*(SUCCESS): Concur AP/GL Extract V.3.02 - *. Concur Batch ID: * Company Code: * Operating Unit: *") 
    | eval Message=case(like('message',"%(SUCCESS): Concur AP/GL Extract V.3.02 - %. Concur Batch ID: % Company Code: % Operating Unit: %"),message) 
    | table Message correlationId
        ] 
| eval Response= coalesce(error,errorMessage,Message) 
| table Status JobType "FileName/JobName" Timestamp CheckMatch Region ConcurRunId HeaderCount SourceFileDTLCount APRecordsCountStaged GLRecordsCountStaged TotalAPGLRecordsCountStaged ArchivedFileName ElapsedTimeInSecs "Total Elapsed Time" sign OracleRequestId Response correlationId 
| fields - ElapsedTimeInSecs priority 
| where JobType!=" " 
| search Status="*"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 04 Apr 2024 16:07:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683293#M55912</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-04T16:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683307#M55913</link>
      <description>&lt;P&gt;OK so use eval with an if such that if the two fields are equal mvappend a value that the formatting picks up to change the colour to what you want. (See the example in the link I provided)&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 17:44:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683307#M55913</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-04T17:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683588#M55948</link>
      <description>&lt;P&gt;Hi&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;I used to this stanze to check the values are match.If i append in mvappend its showing both the values.How to set rules in dashboard.could you pls help on it.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval match=if(SourceFileDTLCount=TotalAPGLRecordsCountStaged,"Match","Not Match")
| eval SourceFileDTLCount=mvappend(SourceFileDTLCount,match)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Apr 2024 12:01:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683588#M55948</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-08T12:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683594#M55949</link>
      <description>&lt;P&gt;As I said earlier, you can use CSS - follow the example in this reply&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-color-the-columns-based-on-previous-column-value/m-p/538879/highlight/true#M152390" target="_blank"&gt;Re: How to color the columns based on previous co... - Splunk Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 12:58:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683594#M55949</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-08T12:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683609#M55950</link>
      <description>&lt;P&gt;As you mentioned i tried the mvappend the fields and its showing both the values in the table .The thing i need to show only when if it is not matched then i need to show the colours.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval match=if(SourceFileDTLCount=TotalAPGLRecordsCountStaged, " ", if(SourceFileDTLCount!=TotalAPGLRecordsCountStaged, "Not Match","RED"))
| eval SourceFileDTLCount=mvappend(SourceFileDTLCount,match)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Apr 2024 15:53:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683609#M55950</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-08T15:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683612#M55951</link>
      <description>&lt;P&gt;Here are the essential parts you should consider using&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval match=if(SourceFileDTLCount!=TotalAPGLRecordsCountStaged, "RED")
| eval SourceFileDTLCount=mvappend(SourceFileDTLCount,match)&lt;/LI-CODE&gt;&lt;P&gt;Obviously, change the tableCellColourWithoutJS to be the id of your panel&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;panel depends="$stayhidden$"&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;style&amp;gt;
          #tableCellColourWithoutJS table tbody td div.multivalue-subcell[data-mv-index="1"]{
            display: none;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;        &amp;lt;format type="color"&amp;gt;
          &amp;lt;colorPalette type="expression"&amp;gt;case (match(value,"RED"), "#ff0000")&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Apr 2024 15:10:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683612#M55951</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-08T15:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683813#M55972</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Its working but if i want to use any multivalue filed in the table.So the result might be affect right.If there is any possible to hide values for particular table using css.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 11:57:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683813#M55972</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-10T11:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683817#M55974</link>
      <description>&lt;P&gt;As I said,&amp;nbsp;&lt;SPAN&gt;change the tableCellColourWithoutJS to be the id of your panel&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 12:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683817#M55974</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-10T12:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683819#M55975</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; I asking for particular table column. Where to use id in it. In the below screenshot both the column has multi value field .If use the&amp;nbsp;&lt;SPAN&gt;tableCellColourWithoutJS&amp;nbsp;another column is affecting .So I want hide mv index for particular column&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 12:48:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683819#M55975</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-04-10T12:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683823#M55976</link>
      <description>&lt;P&gt;Got it. Try like this - you may have to adjust the child number depending on which column you want the CSS to apply to&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;panel depends="$stayhidden$"&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;style&amp;gt;
          #tableCellColourWithoutJS table tbody td:nth-child(1) div.multivalue-subcell[data-mv-index="1"]{
            display: none;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Apr 2024 13:28:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683823#M55976</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-10T13:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two fields values counts ?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683826#M55977</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/205249"&gt;@karthi2809&lt;/a&gt;&amp;nbsp; one advice here, don't post your org-specific queries as is. Obfuscate content to its maximum before posting in any public forum.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 14:19:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-compare-two-fields-values-counts/m-p/683826#M55977</guid>
      <dc:creator>Gr0und_Z3r0</dc:creator>
      <dc:date>2024-04-10T14:19:28Z</dc:date>
    </item>
  </channel>
</rss>

