<?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 do I search top 10 categories with Join function? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590212#M48447</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please check the names of fields of the lookup, probably one of them isn't correct.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2022 13:36:30 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-03-22T13:36:30Z</dc:date>
    <item>
      <title>How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590191#M48442</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have 2 indexes and i am performing a join between both indexes to get the top 10 categories per region. Categories come from one index and region comes from the other index. I am able to perform the join but I am unable to incorporate the top function to get the top 10 categories per region.&lt;BR /&gt;&lt;BR /&gt;Here is my query:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_0-1647949741999.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18679i64AD0D1AFDEFF9C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_0-1647949741999.png" alt="POR160893_0-1647949741999.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Can you please help?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Many thanks,&lt;BR /&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 11:55:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590191#M48442</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-03-22T11:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590194#M48443</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;at first avoid join as soon as possible (Splunk sin't a DB) and use a different approach, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=msg sourcetype=MWAccess3) OR index=solarwind
| lookup cybersecurity_infrastructure NodeID OUTPUT Asset_State NodeName
| eval NodeName=lower(coalesce(NodeName,host))
| search Asset_State=Production
| stats values(Region) AS Region values(legacy_environment) AS legacy_environment BY NodeName&lt;/LI-CODE&gt;&lt;P&gt;Use my hint as an approach.&lt;/P&gt;&lt;P&gt;in addition, please, for the next search put the search as readable text so I can copy it without errors.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 12:10:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590194#M48443</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-22T12:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590210#M48446</link>
      <description>&lt;P&gt;Sure, here is the query:&lt;BR /&gt;&lt;BR /&gt;index=mwg sourcetype=MWGaccess3 | rename host as NodeName | table NodeName, category | dedup NodeName&lt;BR /&gt;| join NodeName [ search index=solarwinds | lookup Cybersecurity_Infrastructure NodeID as NodeID | search Asset_State="Production" NodeName="*mwgproxy*" | eval NodeName=lower(NodeName) | table NodeName, Region, Legacy_Environment | dedup NodeName ]&lt;BR /&gt;&lt;BR /&gt;Your query generated the following error for me though:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_0-1647955997946.png" style="width: 1063px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18680iC0196BED464084CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_0-1647955997946.png" alt="POR160893_0-1647955997946.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 13:33:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590210#M48446</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-03-22T13:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590212#M48447</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please check the names of fields of the lookup, probably one of them isn't correct.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 13:36:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590212#M48447</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-22T13:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590313#M48449</link>
      <description>&lt;P&gt;I still get the same error.&lt;/P&gt;&lt;P&gt;So, my current WORKING query is still:&amp;nbsp;&lt;SPAN&gt;index=mwg sourcetype=MWGaccess3 | rename host as NodeName | table NodeName, category | dedup NodeName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| join NodeName [ search index=solarwinds | lookup Cybersecurity_Infrastructure NodeID as NodeID | search Asset_State="Production" NodeName="*mwgproxy*" | eval NodeName=lower(NodeName) | table NodeName, Region, Legacy_Environment | dedup NodeName ]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Conceptually, I have 2 tables in the form of indexes. I am using these tables to find the top 5 or 10 categories per Region. Now, the total number of Regions is 3 and the total number of categories is 10. The common field across both indexes is NodeName and there are 41 different HostNames.&lt;BR /&gt;&lt;BR /&gt;So, my question is .... what is the BEST way to present the top N Categories per Region in this case?&lt;BR /&gt;&lt;BR /&gt;Like, for each of the 3 Regions, there would need to be N Categories, so the final output table would be&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Region:&amp;nbsp; &amp;nbsp; &amp;nbsp; N Top Categories for that Region&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is this correct?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you btw for all your help as I am new to Splunk and come from a SQL background, so I really, really appreciate ALL your help&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 00:21:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590313#M48449</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-03-23T00:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590349#M48453</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when you say "top" you're meaning the regions with the most count value, is it correct?&lt;/P&gt;&lt;P&gt;if this is your need, try to follow my approach, don't join:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=msg sourcetype=MWAccess3) OR index=solarwind
| lookup cybersecurity_infrastructure NodeID OUTPUT Asset_State NodeName
| eval NodeName=lower(coalesce(NodeName,host))
| search Asset_State=Production
| stats values(Region) AS Region BY NodeName
| top 5 count BY Region&lt;/LI-CODE&gt;&lt;P&gt;In few words:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I create a search containing both the searches (the main search),&lt;/LI&gt;&lt;LI&gt;I created a common key for aggregation (eval coalesce),&lt;/LI&gt;&lt;LI&gt;I aggregated results BY NodeName,&lt;/LI&gt;&lt;LI&gt;I selected the top 5 regions.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If you want to exclude NodeNames present in only one index, you could add a condition to exclude these NodeNames.&lt;/P&gt;&lt;P&gt;If you have more regions for each NodeName, you can separate them.&lt;/P&gt;&lt;P&gt;See the Splunk Search Tutorial to learn how to use SPL:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchTutorial/WelcometotheSearchTutorial" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchTutorial/WelcometotheSearchTutorial&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 07:47:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590349#M48453</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-23T07:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590362#M48454</link>
      <description>&lt;P&gt;Yes, I mean the top N categories per Region (based on count).&lt;BR /&gt;&lt;BR /&gt;Your query gives the following error though:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_0-1648025128351.png" style="width: 865px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18703i2167804A68E4F833/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_0-1648025128351.png" alt="POR160893_0-1648025128351.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is the query in writing too:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(index=mwg sourcetype=MWGaccess3) OR index=solarwinds&lt;BR /&gt;| lookup Cybersecurity_Infrastructure NodeID OUTPUT Asset_State NodeName&lt;BR /&gt;| eval NodeName=lower(coalesce(NodeName,host))&lt;BR /&gt;| search Asset_State="Production"&lt;BR /&gt;| stats values(Region) AS Region BY NodeName&lt;BR /&gt;| top 5 count BY Region&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 08:46:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590362#M48454</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-03-23T08:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590364#M48455</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry: too fast answer, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=mwg sourcetype=MWGaccess3) OR index=solarwinds
| lookup Cybersecurity_Infrastructure NodeID OUTPUT Asset_State NodeName
| eval NodeName=lower(coalesce(NodeName,host))
| search Asset_State="Production"
| stats values(Region) AS Region BY NodeName
| top 5 Region&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 08:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590364#M48455</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-23T08:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590368#M48456</link>
      <description>&lt;P&gt;Yes, this query gives output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_1-1648026912368.png" style="width: 1901px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18705i6B53C7B28521F084/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_1-1648026912368.png" alt="POR160893_1-1648026912368.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;BUT it doesn't even touch the category field from "mwg" index. nodeName was just the primary index between both indexes.&amp;nbsp;&lt;BR /&gt;For the 3 Regions (EMEA, AMER, APJ), I simply need the top 10 categories for that region based on count.&lt;BR /&gt;&lt;BR /&gt;So, the line "| stats values(Region) AS Region BY NodeName" makes it seem I want Region by NodeName ......but I want category by region.&lt;BR /&gt;&lt;BR /&gt;So, 3 columns:&lt;BR /&gt;Region | Categories |count of each category&lt;BR /&gt;&lt;BR /&gt;And there should be N categories per Region.&lt;BR /&gt;&lt;BR /&gt;When I tried to change your current query by incorporating category, I get no output though:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_0-1648026871217.png" style="width: 1069px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18704iCEB6EB04E24632A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_0-1648026871217.png" alt="POR160893_0-1648026871217.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 09:15:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590368#M48456</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-03-23T09:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590371#M48457</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the last search should be correct: what about the search without the last row (the top command)?&lt;/P&gt;&lt;P&gt;Is the category field valued or empty?&lt;/P&gt;&lt;P&gt;where does the category field come from (index or lookup)?&lt;/P&gt;&lt;P&gt;if from lookup, add it to the lookup OUTPUT.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 09:42:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590371#M48457</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-23T09:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590382#M48458</link>
      <description>&lt;P&gt;Without the Top command, I receive the following with no category values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_0-1648029254224.png" style="width: 1211px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18706i1599DA7320F316CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_0-1648029254224.png" alt="POR160893_0-1648029254224.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is strange as if I run the query just as a search, I get data with both the Region and category fields I need:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_1-1648029553294.png" style="width: 1909px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18707i87752B4D2C4A871A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_1-1648029553294.png" alt="POR160893_1-1648029553294.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and:&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_2-1648029612570.png" style="width: 1571px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18708iF720BC9B58F34A14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_2-1648029612570.png" alt="POR160893_2-1648029612570.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_3-1648029657953.png" style="width: 1783px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18709iEF92F9E33F193772/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_3-1648029657953.png" alt="POR160893_3-1648029657953.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is when I add extra commands like top or stats onto this data that it seems to not read the Region or category fields. Like in this case, where it gives no category values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_4-1648029852375.png" style="width: 1157px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18710i08A856D03D0761BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_4-1648029852375.png" alt="POR160893_4-1648029852375.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 10:04:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590382#M48458</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-03-23T10:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590384#M48459</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as I said, category is from index or from lookup?&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=mwg sourcetype=MWGaccess3) OR index=solarwinds
| lookup Cybersecurity_Infrastructure NodeID OUTPUT Asset_State NodeName
| eval NodeName=lower(coalesce(NodeName,host))
| search Asset_State="Production"
| stats values(category) AS category BY NodeName Region
| top 5 category BY Region&lt;/LI-CODE&gt;&lt;P&gt;if you have a multivalue in category field,&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=mwg sourcetype=MWGaccess3) OR index=solarwinds
| lookup Cybersecurity_Infrastructure NodeID OUTPUT Asset_State NodeName
| eval NodeName=lower(coalesce(NodeName,host))
| search Asset_State="Production"
| stats values(category) AS category BY NodeName Region
| mvexpand category
| top 5 category BY Region&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 10:15:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590384#M48459</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-23T10:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590387#M48460</link>
      <description>&lt;P&gt;Category is from index, i.e.&amp;nbsp;(index=mwg sourcetype=MWGaccess3) OR index=solarwinds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 10:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590387#M48460</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-03-23T10:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590389#M48461</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;probably the position of the filter for Asset_State is the error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=mwg sourcetype=MWGaccess3) OR index=solarwinds
| lookup Cybersecurity_Infrastructure NodeID OUTPUT Asset_State NodeName
| eval NodeName=lower(coalesce(NodeName,host))
| stats values(category) AS category values(Asset_State) AS Asset_State BY NodeName Region
| search Asset_State="Production"
| top 5 category BY Region&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 10:30:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590389#M48461</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-23T10:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590640#M48474</link>
      <description>&lt;P&gt;This is what FINALLY worked foe me btw&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="POR160893_0-1648118853573.png" style="width: 1893px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18745iA5D53EC8E91FFC12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="POR160893_0-1648118853573.png" alt="POR160893_0-1648118853573.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 10:47:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590640#M48474</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-03-24T10:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590646#M48476</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, please accept an answer for the other peopel of Community.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 11:29:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590646#M48476</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-24T11:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590668#M48479</link>
      <description>&lt;P&gt;Karma given&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 13:16:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590668#M48479</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-03-24T13:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search top 10 categories with Join function?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590686#M48481</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;thank you very much, see next time.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 14:05:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-search-top-10-categories-with-Join-function/m-p/590686#M48481</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-24T14:05:24Z</dc:date>
    </item>
  </channel>
</rss>

