<?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 to sum one column based on unique values in another column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1333616#M23679</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you both for the suggested solutions but neither of them to seem to work. The issue I am having in the beginning is that both the zip code &amp;amp; order column were in text format. I have changed to a whole number but whenever I try to create a visual off of the measure or column, I get an error message saying it can't display.&lt;/P&gt;</description>
    <pubDate>Sat, 29 Aug 2020 16:10:09 GMT</pubDate>
    <dc:creator>nsessa</dc:creator>
    <dc:date>2020-08-29T16:10:09Z</dc:date>
    <item>
      <title>How to sum one column based on unique values in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1329447#M23528</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one table i am currently trying to work with in Power Bi. I have 2 columns, one is sales orders, the other is the zip code that the order went to. I am trying to figure out how I can find the total orders that have the same zip code associated to it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the best way to do this?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 15:30:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1329447#M23528</guid>
      <dc:creator>nsessa</dc:creator>
      <dc:date>2020-08-27T15:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum one column based on unique values in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1329448#M23529</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255542" data-lia-user-login="nsessa" class="lia-mention lia-mention-user"&gt;nsessa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just drag both columns to a table visual for example and change the aggregation of the sales order to count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you have a total orders by zip code.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 15:32:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1329448#M23529</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-08-27T15:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum one column based on unique values in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1329487#M23531</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="215853" data-lia-user-login="camargos88" class="lia-mention lia-mention-user"&gt;camargos88&lt;/a&gt;&amp;nbsp;thank you for that advice. Is there any way to do this as a measure though?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 15:47:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1329487#M23531</guid>
      <dc:creator>nsessa</dc:creator>
      <dc:date>2020-08-27T15:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum one column based on unique values in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1329532#M23532</link>
      <description>&lt;P&gt;To get the total for the same zip code, you can use this measure expression&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Total This Zipcode = CALCULATE(SUM(Table[Amount]), ALLEXCEPT(Table, Table[Zipcode]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Replace with your actual table and column names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this works for you, please mark it as the solution.&amp;nbsp; Kudos are appreciated too.&amp;nbsp; Please let me know if not.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 16:06:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1329532#M23532</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-08-27T16:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum one column based on unique values in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1329616#M23538</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255542" data-lia-user-login="nsessa" class="lia-mention lia-mention-user"&gt;nsessa&lt;/a&gt; , You can create new column and new measure like given below &lt;/P&gt;
&lt;P&gt;new column = sumx(filter(table, [zip] = earlier([zip])),[sales])&lt;/P&gt;
&lt;P&gt;new measure = sumx(filter(allselected(table), [zip] = max([zip])),[sales])&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 16:27:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1329616#M23538</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-27T16:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum one column based on unique values in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1333616#M23679</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you both for the suggested solutions but neither of them to seem to work. The issue I am having in the beginning is that both the zip code &amp;amp; order column were in text format. I have changed to a whole number but whenever I try to create a visual off of the measure or column, I get an error message saying it can't display.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 16:10:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1333616#M23679</guid>
      <dc:creator>nsessa</dc:creator>
      <dc:date>2020-08-29T16:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum one column based on unique values in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1333940#M23701</link>
      <description>&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255542" data-lia-user-login="nsessa" class="lia-mention lia-mention-user"&gt;nsessa&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Zip codes should be text. Even if the format is a number, these are not numbers that should have a number semantics - you don't perform typical number operations like addition on zip codes. So, they should be text.&lt;BR /&gt;&lt;BR /&gt;Second, if you drag the zip code column to a visual (say, table), then this measure will give you the total of orders that are associated to this code:&lt;BR /&gt;&lt;BR /&gt;[Total] = SUM( T[Order Amount] )&lt;BR /&gt;&lt;BR /&gt;where T is the name of your table.&lt;BR /&gt;&lt;BR /&gt;If your need is different and you want to be able to drag orders onto a visual and then get the total for all orders for all the visible zip codes in the current context, then your measure would be:&lt;BR /&gt;&lt;BR /&gt;CALCULATE( [Total], ALL( T ), VALUES( T[ZipCode] )</description>
      <pubDate>Sun, 30 Aug 2020 07:11:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-one-column-based-on-unique-values-in-another-column/m-p/1333940#M23701</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2020-08-30T07:11:13Z</dc:date>
    </item>
  </channel>
</rss>

