<?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: Sum a column with duplicates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-column-with-duplicates/m-p/2842454#M90839</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks your answer, I'm going to edit and clarify my question a little because I don't believe those links resolve this question necessarily.&lt;/P&gt;&lt;P&gt;We want to create a measure which would sum the quantity of any Farm or any Barrel, not just filtering the sum to find one Barrel or one Farm.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2022 12:29:39 GMT</pubDate>
    <dc:creator>roberts_stats</dc:creator>
    <dc:date>2022-10-14T12:29:39Z</dc:date>
    <item>
      <title>Sum a column with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-column-with-duplicates/m-p/2841989#M90816</link>
      <description>&lt;P&gt;How many apples are there at each Farm (with DAX)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Farm&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Barrel&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Apples&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Taster&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Vote&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;North Farm&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Green Barrel&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Sweet&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;North Farm&lt;/TD&gt;&lt;TD&gt;Green Barrel&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;TD&gt;Sue&lt;/TD&gt;&lt;TD&gt;Sweet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;North Farm&lt;/TD&gt;&lt;TD&gt;Red Barrel&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Bitter&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;South Farm&lt;/TD&gt;&lt;TD&gt;Blue Barrel&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Sweet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;South Farm&lt;/TD&gt;&lt;TD&gt;Blue Barrel&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;Sue&lt;/TD&gt;&lt;TD&gt;Sweet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;South Farm&lt;/TD&gt;&lt;TD&gt;Pink Barrel&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Sweet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;South Farm&lt;/TD&gt;&lt;TD&gt;Pink Barrel&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;Sue&lt;/TD&gt;&lt;TD&gt;Bitter&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;South Farm&lt;/TD&gt;&lt;TD&gt;Pink Barrel&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;Carol&lt;/TD&gt;&lt;TD&gt;Sweet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;South Farm&lt;/TD&gt;&lt;TD&gt;Red Barrel&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;Carol&lt;/TD&gt;&lt;TD&gt;Bitter&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We want to create a measure which would sum the quantity of any Farm or any Barrel?&lt;/P&gt;&lt;P&gt;Like the Apple Measure shown below for example ...&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;&lt;P&gt;Farm,Barrel,Apples,Taster,Vote&lt;BR /&gt;North Farm,Green Barrel,150,John,Sweet&lt;BR /&gt;North Farm,Green Barrel,150,Sue,Sweet&lt;BR /&gt;North Farm,Red Barrel,150,John,Bitter&lt;BR /&gt;South Farm,Blue Barrel,200,John,Sweet&lt;BR /&gt;South Farm,Blue Barrel,200,Sue,Sweet&lt;BR /&gt;South Farm,Pink Barrel,300,John, Sweet&lt;BR /&gt;South Farm,Pink Barrel,300,Sue,Bitter&lt;BR /&gt;South Farm,Pink Barrel,300,Carol,Sweet&lt;BR /&gt;South Farm,Red Barrel,50,Carol,Bitter&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 12:30:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-column-with-duplicates/m-p/2841989#M90816</guid>
      <dc:creator>roberts_stats</dc:creator>
      <dc:date>2022-10-14T12:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sum a column with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-column-with-duplicates/m-p/2842124#M90820</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am going to give a few pointers which should help you to solve this issue:&lt;BR /&gt;&lt;BR /&gt;You can use CALCULATE to modify filter context of a measure/function by using functions such as ALL, REMOVEFILTERS, ALLEXCEPT.&amp;nbsp; E.g. ALL(Table[column]) will remove filters affecting that column.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The use case you are describing is common and I recommend checking these resources to understand more:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/introducing-calculate-in-dax/" target="_blank"&gt;Introducing CALCULATE in DAX - SQLBI&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/calculate-function-dax" target="_blank"&gt;CALCULATE function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/filter-context-in-dax/" target="_blank"&gt;Filter context in DAX - SQLBI&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I believe you can create your measure after reading these.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 09:55:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-column-with-duplicates/m-p/2842124#M90820</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-10-14T09:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sum a column with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-column-with-duplicates/m-p/2842454#M90839</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks your answer, I'm going to edit and clarify my question a little because I don't believe those links resolve this question necessarily.&lt;/P&gt;&lt;P&gt;We want to create a measure which would sum the quantity of any Farm or any Barrel, not just filtering the sum to find one Barrel or one Farm.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 12:29:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-column-with-duplicates/m-p/2842454#M90839</guid>
      <dc:creator>roberts_stats</dc:creator>
      <dc:date>2022-10-14T12:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sum a column with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-column-with-duplicates/m-p/2853355#M91578</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="456580" data-lia-user-login="roberts_stats" class="lia-mention lia-mention-user"&gt;roberts_stats&lt;/a&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;You can consider add a summarized table to remove the &lt;SPAN&gt;duplicates records and&amp;nbsp;keep the valid record columns.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Calculated Table:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = SUMMARIZE('Table','Table'[Farm],'Table'[Barrel],'Table'[Apples])&lt;/LI-CODE&gt;
&lt;P&gt;Then you can perform calculations based on this summary table.&lt;/P&gt;
&lt;P&gt;From the summary table you can easily tell&amp;nbsp;h&lt;SPAN&gt;ow many apples are there at each Farm.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Eason&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 09:51:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-column-with-duplicates/m-p/2853355#M91578</guid>
      <dc:creator>v-easonf-msft</dc:creator>
      <dc:date>2022-10-20T09:51:15Z</dc:date>
    </item>
  </channel>
</rss>

