<?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: Identify Duplicated values in Water Cooler</title>
    <link>https://community.qlik.com/t5/Water-Cooler/Identify-Duplicated-values/m-p/2460466#M13740</link>
    <description>&lt;P&gt;Hi, you can add an expression with just Count(SiteCode), and sorted descendant by this expression will set the duplicated codes in the first rows, and/or add a red color background "If(Count(SiteCode)&amp;gt;1, LightRed())"&lt;/P&gt;
&lt;P&gt;To do the check by group the count could be Count(Group &amp;amp;'_'&amp;amp; SiteCode).&lt;/P&gt;
&lt;P&gt;The same can be done by SiteName.&lt;/P&gt;</description>
    <pubDate>Sun, 09 Jun 2024 06:38:56 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2024-06-09T06:38:56Z</dc:date>
    <item>
      <title>Identify Duplicated values</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Identify-Duplicated-values/m-p/2460463#M13739</link>
      <description>&lt;P&gt;Good Day.&lt;/P&gt;
&lt;P&gt;I am looking for any advise on how to resolve this issue. I have a dataset consisting of Groups, with Sites and Site Names. From time to time a new site can accidently be allocated the same Site Code or Site Name as an existing site.&lt;/P&gt;
&lt;P&gt;I am looking for a way to identify duplicate Site Codes and Site Names, as per the included PNG file. It can also be that the Site Codes are different and the Site Names are the same.&lt;/P&gt;
&lt;P&gt;The “# Sites” expression is “RowNo(Total) ” and currently the expression to Identify the duplicate Site code is “Rangecount(Above(Count(Sitecode), 0, RowNo()))”.&lt;/P&gt;
&lt;P&gt;I would be appreciate any suggestions on the issue, whether in a straight table or by creating a separate table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you – much appreciated.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2024 04:47:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Identify-Duplicated-values/m-p/2460463#M13739</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2024-06-09T04:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Duplicated values</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Identify-Duplicated-values/m-p/2460466#M13740</link>
      <description>&lt;P&gt;Hi, you can add an expression with just Count(SiteCode), and sorted descendant by this expression will set the duplicated codes in the first rows, and/or add a red color background "If(Count(SiteCode)&amp;gt;1, LightRed())"&lt;/P&gt;
&lt;P&gt;To do the check by group the count could be Count(Group &amp;amp;'_'&amp;amp; SiteCode).&lt;/P&gt;
&lt;P&gt;The same can be done by SiteName.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2024 06:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Identify-Duplicated-values/m-p/2460466#M13740</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2024-06-09T06:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Duplicated values</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Identify-Duplicated-values/m-p/2460468#M13741</link>
      <description>&lt;P&gt;You can use a combination of the Count() function and a Group By clause in your script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a new table where you'll flag the duplicates.&lt;/P&gt;
&lt;P&gt;// Load your initial data&lt;BR /&gt;SitesTable:&lt;BR /&gt;LOAD&lt;BR /&gt;Group,&lt;BR /&gt;SiteCode,&lt;BR /&gt;Company&lt;BR /&gt;FROM [YourDataSource];&lt;/P&gt;
&lt;P&gt;// Create a table to flag duplicate Site Codes&lt;BR /&gt;DuplicateSiteCodes:&lt;BR /&gt;LOAD&lt;BR /&gt;SiteCode,&lt;BR /&gt;If(Count(SiteCode) &amp;gt; 1, 'Duplicate', 'Unique') as DuplicateCodeFlag&lt;BR /&gt;RESIDENT SitesTable&lt;BR /&gt;GROUP BY SiteCode;&lt;/P&gt;
&lt;P&gt;// Create a table to flag duplicate Site Names&lt;BR /&gt;DuplicateCompany:&lt;BR /&gt;LOAD&lt;BR /&gt;Company,&lt;BR /&gt;If(Count(Company) &amp;gt; 1, 'Duplicate', 'Unique') as DuplicateNameFlag&lt;BR /&gt;RESIDENT SitesTable&lt;BR /&gt;GROUP BY Company;&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="TauseefKhan_0-1717915704773.png" style="width: 527px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167582i63F84DFFC1C6CAC2/image-dimensions/527x210?v=v2" width="527" height="210" role="button" title="TauseefKhan_0-1717915704773.png" alt="TauseefKhan_0-1717915704773.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;SPAN&gt;****Hope this resolve your issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the issue is solved please mark the answer with Accept as Solution &amp;amp; like it.****&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2024 06:51:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Identify-Duplicated-values/m-p/2460468#M13741</guid>
      <dc:creator>TauseefKhan</dc:creator>
      <dc:date>2024-06-09T06:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Duplicated values</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Identify-Duplicated-values/m-p/2460475#M13742</link>
      <description>&lt;P&gt;If you want to do this in the script you can use exists() to identify duplicates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Sitecode, Company, Group,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Exists(Sitecode) as duplicate_site&lt;/P&gt;
&lt;P&gt;From Source;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also try to use the window() function that was released in September 2023. Here is two alternatives depending on what you want to count.&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Window(count(Sitecode),Sitecode) as no_of_sitecodes,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Window(count( distinct Company),Sitecode) as no_of_unique_companies_per_sitecode,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;*&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Sitecode, Company, Group&lt;/P&gt;
&lt;P&gt;From Source;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2024 08:21:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Identify-Duplicated-values/m-p/2460475#M13742</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2024-06-09T08:21:33Z</dc:date>
    </item>
  </channel>
</rss>

