<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Finding Duplicates in DAX	</title>
	<atom:link href="https://prologika.com/finding-duplicates-in-dax/feed/" rel="self" type="application/rss+xml" />
	<link>https://prologika.com/finding-duplicates-in-dax/</link>
	<description>Business Intelligence Consulting and Training in Atlanta</description>
	<lastBuildDate>Wed, 15 Mar 2017 01:07:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>
		By: Prologika		</title>
		<link>https://prologika.com/finding-duplicates-in-dax/#comment-281</link>

		<dc:creator><![CDATA[Prologika]]></dc:creator>
		<pubDate>Wed, 15 Mar 2017 01:07:00 +0000</pubDate>
		<guid isPermaLink="false">/CS/blogs/blog/archive/2015/02/15/finding-duplicates-in-dax.aspx#comment-281</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://prologika.com/finding-duplicates-in-dax/#comment-280&quot;&gt;Marty Piecyk&lt;/a&gt;.

The following modified expression will flag the first occurence of the duplicated row as 1, assuming the table has an unique identifier and the data is ordered by it, such as the DimProduct table in AdventureWorksDW.
Index = CALCULATE(COUNTROWS(), ALLEXCEPT(Product, &#039;Product&#039;[ProductAlternateKey]), EARLIER(Product[ProductKey]) &#062;= Product[ProductKey])]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://prologika.com/finding-duplicates-in-dax/#comment-280">Marty Piecyk</a>.</p>
<p>The following modified expression will flag the first occurence of the duplicated row as 1, assuming the table has an unique identifier and the data is ordered by it, such as the DimProduct table in AdventureWorksDW.<br />
Index = CALCULATE(COUNTROWS(), ALLEXCEPT(Product, &#8216;Product'[ProductAlternateKey]), EARLIER(Product[ProductKey]) &gt;= Product[ProductKey])</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Marty Piecyk		</title>
		<link>https://prologika.com/finding-duplicates-in-dax/#comment-280</link>

		<dc:creator><![CDATA[Marty Piecyk]]></dc:creator>
		<pubDate>Tue, 14 Mar 2017 23:18:00 +0000</pubDate>
		<guid isPermaLink="false">/CS/blogs/blog/archive/2015/02/15/finding-duplicates-in-dax.aspx#comment-280</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://prologika.com/finding-duplicates-in-dax/#comment-279&quot;&gt;Marty Piecyk&lt;/a&gt;.

Here&#039;s one solution. I&#039;m sharing this, since this posting shows up in the top results of search engines.

For example, given this table &quot;Host&quot;:
ID	HostName	IpAddress	CreatedDate
1	duplicatehost	192.168.1.2	2017-03-13
2	duplicatehost	192.168.1.2	2017-01-01
3	singlehost	192.168.1.3	2017-03-13

This DAX can be used to generate the following calculated table using “HostName” and “IpAddress” as the key for finding duplicates and getting the latest CreatedDate:

=FILTER(Host, [CreatedDate]=MAXX(FILTER(Host, [HostName]=EARLIER([HostName]) &#038;&#038; [IpAddress]=EARLIER([IpAddress])), [CreatedDate]))

ID	HostName	IpAddress	CreatedDate
1	duplicatehost	192.168.1.2	2017-03-13
3	singlehost	192.168.1.3	2017-03-13

There must not any duplication of the CreatedDate column for the key-grouping or duplicates will be present in the output. In my use case, duplicates are not possible.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://prologika.com/finding-duplicates-in-dax/#comment-279">Marty Piecyk</a>.</p>
<p>Here&#8217;s one solution. I&#8217;m sharing this, since this posting shows up in the top results of search engines.</p>
<p>For example, given this table &#8220;Host&#8221;:<br />
ID	HostName	IpAddress	CreatedDate<br />
1	duplicatehost	192.168.1.2	2017-03-13<br />
2	duplicatehost	192.168.1.2	2017-01-01<br />
3	singlehost	192.168.1.3	2017-03-13</p>
<p>This DAX can be used to generate the following calculated table using “HostName” and “IpAddress” as the key for finding duplicates and getting the latest CreatedDate:</p>
<p>=FILTER(Host, [CreatedDate]=MAXX(FILTER(Host, [HostName]=EARLIER([HostName]) &amp;&amp; [IpAddress]=EARLIER([IpAddress])), [CreatedDate]))</p>
<p>ID	HostName	IpAddress	CreatedDate<br />
1	duplicatehost	192.168.1.2	2017-03-13<br />
3	singlehost	192.168.1.3	2017-03-13</p>
<p>There must not any duplication of the CreatedDate column for the key-grouping or duplicates will be present in the output. In my use case, duplicates are not possible.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Marty Piecyk		</title>
		<link>https://prologika.com/finding-duplicates-in-dax/#comment-279</link>

		<dc:creator><![CDATA[Marty Piecyk]]></dc:creator>
		<pubDate>Tue, 14 Mar 2017 18:10:00 +0000</pubDate>
		<guid isPermaLink="false">/CS/blogs/blog/archive/2015/02/15/finding-duplicates-in-dax.aspx#comment-279</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://prologika.com/finding-duplicates-in-dax/#comment-278&quot;&gt;Prologika&lt;/a&gt;.

Thanks for the reply. I&#039;m using Analysis Services and connecting to my server live through Power BI Desktop. So, I cannot edit queries or use the Remove Duplicates feature in Power BI Desktop. Also, I need to create relationships between my tables, but this can only be done after the duplicates are removed, so I would rather do this in my Analysis Services model.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://prologika.com/finding-duplicates-in-dax/#comment-278">Prologika</a>.</p>
<p>Thanks for the reply. I&#8217;m using Analysis Services and connecting to my server live through Power BI Desktop. So, I cannot edit queries or use the Remove Duplicates feature in Power BI Desktop. Also, I need to create relationships between my tables, but this can only be done after the duplicates are removed, so I would rather do this in my Analysis Services model.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Prologika		</title>
		<link>https://prologika.com/finding-duplicates-in-dax/#comment-278</link>

		<dc:creator><![CDATA[Prologika]]></dc:creator>
		<pubDate>Tue, 14 Mar 2017 14:53:00 +0000</pubDate>
		<guid isPermaLink="false">/CS/blogs/blog/archive/2015/02/15/finding-duplicates-in-dax.aspx#comment-278</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://prologika.com/finding-duplicates-in-dax/#comment-277&quot;&gt;Marty Piecyk&lt;/a&gt;.

Hi Marty. Which tool are using: Power BI Desktop, Excel? As you mentioned, this blog is two-year old. Have you tried the Remove Duplicates feature in the Query Editor which is available in both Power BI Desktop and Excel?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://prologika.com/finding-duplicates-in-dax/#comment-277">Marty Piecyk</a>.</p>
<p>Hi Marty. Which tool are using: Power BI Desktop, Excel? As you mentioned, this blog is two-year old. Have you tried the Remove Duplicates feature in the Query Editor which is available in both Power BI Desktop and Excel?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Marty Piecyk		</title>
		<link>https://prologika.com/finding-duplicates-in-dax/#comment-277</link>

		<dc:creator><![CDATA[Marty Piecyk]]></dc:creator>
		<pubDate>Tue, 14 Mar 2017 00:22:00 +0000</pubDate>
		<guid isPermaLink="false">/CS/blogs/blog/archive/2015/02/15/finding-duplicates-in-dax.aspx#comment-277</guid>

					<description><![CDATA[&quot;Once the column is created, you can filter on it in the Data View to find out the duplicate rows with values 2, 3, etc.&quot;
Thanks for this helpful post (although it&#039;s two years old at the moment). By filtering out duplicate rows with values 2 and greater, you&#039;ll remove every instance of a value that has a duplicate. Do you have any advice how to keep the first instance of a duplicate?

In your example above, the row with ID 2 would be present in your new calculated table, but customers will wonder where the row with ID 1 is.]]></description>
			<content:encoded><![CDATA[<p>&#8220;Once the column is created, you can filter on it in the Data View to find out the duplicate rows with values 2, 3, etc.&#8221;<br />
Thanks for this helpful post (although it&#8217;s two years old at the moment). By filtering out duplicate rows with values 2 and greater, you&#8217;ll remove every instance of a value that has a duplicate. Do you have any advice how to keep the first instance of a duplicate?</p>
<p>In your example above, the row with ID 2 would be present in your new calculated table, but customers will wonder where the row with ID 1 is.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
