<?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: Avoid duplicates doing the calculations in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409065#M175082</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="683724" data-lia-user-login="dofrancis3" class="lia-mention lia-mention-user"&gt;dofrancis3&lt;/a&gt;&amp;nbsp;, try using this for Burkina Faso value column:P1&lt;BR /&gt;P1 =&lt;BR /&gt;SUMX(&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;FILTER( TableName, TableName[Country] = "Burkina Faso" ),&lt;BR /&gt;TableName[Year], TableName[Quarter], "UniqueP1", MAX(TableName[P1])&lt;BR /&gt;),&lt;BR /&gt;[UniqueP1]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it works then use the same for other P2,z1,z2,m1,m2 columns as well&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2025 12:45:54 GMT</pubDate>
    <dc:creator>powerbidev123</dc:creator>
    <dc:date>2025-02-13T12:45:54Z</dc:date>
    <item>
      <title>Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408617#M175059</link>
      <description>&lt;P&gt;Dear Colleagues,&lt;/P&gt;&lt;P&gt;I would like to request your assistance please !&lt;/P&gt;&lt;P&gt;As you can see in the table below, I have &lt;STRONG&gt;duplicates&lt;/STRONG&gt;. How can I proceed to make the calculation (sum) without considering the duplicates?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your support&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 08:09:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408617#M175059</guid>
      <dc:creator>dofrancis3</dc:creator>
      <dc:date>2025-02-13T08:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408637#M175060</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="683724" data-lia-user-login="dofrancis3" class="lia-mention lia-mention-user"&gt;dofrancis3&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the duplicates are not identical across all columns but need to be grouped by &lt;STRONG&gt;Country, Year, and Quarter&lt;/STRONG&gt;, use &lt;STRONG&gt;DAX&lt;/STRONG&gt;:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;SUM_NO_DUPLICATES = SUMX( DISTINCT(SELECTCOLUMNS('Table', "Country", 'Table'[Country], "Year", 'Table'[Year], "Quarter", 'Table'[Quarter], "P1", 'Table'[P1], "P2", 'Table'[P2])), 'Table'[P1] + 'Table'[P2] )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;This formula ensures that only unique &lt;STRONG&gt;(Country, Year, Quarter, P1, P2)&lt;/STRONG&gt; combinations are considered.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 08:21:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408637#M175060</guid>
      <dc:creator>powerbidev123</dc:creator>
      <dc:date>2025-02-13T08:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408648#M175062</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="752610" data-lia-user-login="powerbidev123" class="lia-mention lia-mention-user"&gt;powerbidev123&lt;/a&gt;&amp;nbsp;in my case the duplicates are identical across all columns.&lt;/P&gt;&lt;P&gt;So, how can i modifie the DAX.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 08:36:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408648#M175062</guid>
      <dc:creator>dofrancis3</dc:creator>
      <dc:date>2025-02-13T08:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408698#M175065</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="683724" data-lia-user-login="dofrancis3" class="lia-mention lia-mention-user"&gt;dofrancis3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide your expected output. If your data model consist mutiple duplicate column then suggesting you provide the data based on that..&lt;BR /&gt;Regards&lt;/P&gt;
&lt;P&gt;sanalytics&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 08:58:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408698#M175065</guid>
      <dc:creator>sanalytics</dc:creator>
      <dc:date>2025-02-13T08:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408777#M175070</link>
      <description>&lt;P&gt;HI &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="683724" data-lia-user-login="dofrancis3" class="lia-mention lia-mention-user"&gt;dofrancis3&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;you can use this type of formla to&amp;nbsp;&lt;SPAN&gt;Avoid duplicates doing the calculations&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;P1 Total = SUMX(DISTINCT('Table (5)'),'Table (5)'[P1])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;P2 Total = SUMX(DISTINCT('Table (5)'),'Table (5)'[P2])&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;helps&lt;/EM&gt;, then please give us Kudos and consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as a solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 09:32:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408777#M175070</guid>
      <dc:creator>vivek31</dc:creator>
      <dc:date>2025-02-13T09:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408803#M175073</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Especially if all your columns are identical, I think the best options is not to go into complicated DAX but just to remove duplicates using Power Query.&lt;/P&gt;&lt;P&gt;In case using Power Query is not an option, for example you're working with a Direct Query, Semantic model...&lt;BR /&gt;1/ You should consider why duplicates are there... since it is not "normal" to have duplicates in the source. So, is it possible to clean the source ?&lt;BR /&gt;2/ If not possible to clean the source... Why not building a table with DAX (CALCULATETABLE...) without the duplicates (VALUES, DISTINCT...) and then use this table to do your calculation with simple SUM ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I am concerned I do not like to work with a source with duplicates, it might be the source of so many troubles, so the best option, would be to clean the source at whatever level (source itself, Power Query, DAX) and then work with clean data.&lt;/P&gt;&lt;P&gt;Hope it helps and it is only my wiew of a situation I do not deeply know&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 09:42:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4408803#M175073</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2025-02-13T09:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409025#M175081</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="195725" data-lia-user-login="sanalytics" class="lia-mention lia-mention-user"&gt;sanalytics&lt;/a&gt;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="120362" data-lia-user-login="AilleryO" class="lia-mention lia-mention-user"&gt;AilleryO&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="692058" data-lia-user-login="vivek31" class="lia-mention lia-mention-user"&gt;vivek31&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="752610" data-lia-user-login="powerbidev123" class="lia-mention lia-mention-user"&gt;powerbidev123&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;&lt;P&gt;As per the table below I would like to calculate the Sum of each column by COUNTRY without duplication&lt;/P&gt;&lt;P&gt;Please see below example of output expected:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 12:19:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409025#M175081</guid>
      <dc:creator>dofrancis3</dc:creator>
      <dc:date>2025-02-13T12:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409065#M175082</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="683724" data-lia-user-login="dofrancis3" class="lia-mention lia-mention-user"&gt;dofrancis3&lt;/a&gt;&amp;nbsp;, try using this for Burkina Faso value column:P1&lt;BR /&gt;P1 =&lt;BR /&gt;SUMX(&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;FILTER( TableName, TableName[Country] = "Burkina Faso" ),&lt;BR /&gt;TableName[Year], TableName[Quarter], "UniqueP1", MAX(TableName[P1])&lt;BR /&gt;),&lt;BR /&gt;[UniqueP1]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it works then use the same for other P2,z1,z2,m1,m2 columns as well&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 12:45:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409065#M175082</guid>
      <dc:creator>powerbidev123</dc:creator>
      <dc:date>2025-02-13T12:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409106#M175084</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="752610" data-lia-user-login="powerbidev123" class="lia-mention lia-mention-user"&gt;powerbidev123&lt;/a&gt;&amp;nbsp;sorry it doen't work please just to let you know that Burkina foso is just an exemple of out kind of output i expect so i don't need to write Burkina faso in my DAX mesure because duplication can be for other countries.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 13:02:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409106#M175084</guid>
      <dc:creator>dofrancis3</dc:creator>
      <dc:date>2025-02-13T13:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409388#M175093</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="683724" data-lia-user-login="dofrancis3" class="lia-mention lia-mention-user"&gt;dofrancis3&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Sorry I just saw your screen copy.&lt;/P&gt;&lt;P&gt;First you should &lt;STRONG&gt;unpivot all your columns except the country, year and quarter&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;So you'll get all values in one column and one column which states if it is P1 or P2...&lt;/P&gt;&lt;P&gt;This column will be our filter in the visual (rows or column).&lt;/P&gt;&lt;P&gt;Then you remove the duplicates, (with dedicated button after selecting all your columns)&lt;/P&gt;&lt;P&gt;and finally you just have to sum up your values in a visual, maybe without any DAX at all.&lt;/P&gt;&lt;P&gt;Even though I would recommend a simple DAX Like : SUM( [Attribute] ).&lt;/P&gt;&lt;P&gt;Attribute being the name of your column with your values.&lt;/P&gt;&lt;P&gt;Then choose if you want the country in rows or columns,&lt;/P&gt;&lt;P&gt;and do the same with the column with values P1, P2.&lt;/P&gt;&lt;P&gt;If you provide sample data I can make you a quick pbix to show you.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 15:25:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409388#M175093</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2025-02-13T15:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409635#M175105</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="120362" data-lia-user-login="AilleryO" class="lia-mention lia-mention-user"&gt;AilleryO&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;&lt;P&gt;Kindly, find bellow sample data as requested&lt;/P&gt;&lt;P&gt;Thank you for support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Sample Excel data for quick pbix " href="https://docs.google.com/spreadsheets/d/1WEI2yxmBLBqqG6k-PMSS8BtpySeMfj_xJlmK_DZ_et0/edit?usp=drive_link" target="_self"&gt;https://docs.google.com/spreadsheets/d/1WEI2yxmBLBqqG6k-PMSS8BtpySeMfj_xJlmK_DZ_et0/edit?usp=drive_link&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 18:04:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4409635#M175105</guid>
      <dc:creator>dofrancis3</dc:creator>
      <dc:date>2025-02-13T18:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4410107#M175142</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="683724" data-lia-user-login="dofrancis3" class="lia-mention lia-mention-user"&gt;dofrancis3&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please grant access to your form so that I can open your link.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jayleny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 03:04:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4410107#M175142</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-14T03:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid duplicates doing the calculations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4410717#M175159</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="683724" data-lia-user-login="dofrancis3" class="lia-mention lia-mention-user"&gt;dofrancis3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot access your file.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 09:01:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Avoid-duplicates-doing-the-calculations/m-p/4410717#M175159</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2025-02-14T09:01:47Z</dc:date>
    </item>
  </channel>
</rss>

