<?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: Getting sum of a column of distinct rows from a filtered table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235899#M167553</link>
    <description>&lt;P&gt;But what is the business rule to decide the value of Sales to be used in the calculation for a distinct client ?&lt;BR /&gt;&lt;BR /&gt;Lets assume Clinet Alpha has 2 unique Sales value&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Which one should be used 1000 or 2000 ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2024 23:59:58 GMT</pubDate>
    <dc:creator>SachinNandanwar</dc:creator>
    <dc:date>2024-10-09T23:59:58Z</dc:date>
    <item>
      <title>Getting sum of a column of distinct rows from a filtered table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4234626#M167472</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3 Tables:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Account:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Account ID&lt;/TD&gt;&lt;TD&gt;Account Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123456789&lt;/TD&gt;&lt;TD&gt;Company A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;234567891&lt;/TD&gt;&lt;TD&gt;Company B&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Employee&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Account Name&lt;/TD&gt;&lt;TD&gt;Employee ID&lt;/TD&gt;&lt;TD&gt;Employee&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Company A&lt;/TD&gt;&lt;TD&gt;E001&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Company A&lt;/TD&gt;&lt;TD&gt;E002&lt;/TD&gt;&lt;TD&gt;James&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Company B&lt;/TD&gt;&lt;TD&gt;E003&lt;/TD&gt;&lt;TD&gt;Will&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Connections&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Connection ID&lt;/TD&gt;&lt;TD&gt;Client ID&lt;/TD&gt;&lt;TD&gt;Client&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Sales&lt;/TD&gt;&lt;TD&gt;Account Name&lt;/TD&gt;&lt;TD&gt;Employee ID&lt;/TD&gt;&lt;TD&gt;Employee&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C0001&lt;/TD&gt;&lt;TD&gt;BU0001&lt;/TD&gt;&lt;TD&gt;Alpha&lt;/TD&gt;&l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;TD&gt;Echo&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;3,000&lt;/TD&gt;&lt;TD&gt;Company B&lt;/TD&gt;&lt;TD&gt;E003&lt;/TD&gt;&lt;TD&gt;Will&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;I want to add another column in the&amp;nbsp;&lt;STRONG&gt;Accounts&lt;/STRONG&gt; table called "Total Sales per Category 1 Clients".&lt;/P&gt;&lt;P&gt;The idea is to get the sum of the 'Sales' value for distinct 'Client IDs' for "Category 1" clients only.&lt;/P&gt;&lt;P&gt;So the result would be:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Account ID&lt;/TD&gt;&lt;TD&gt;Account Name&lt;/TD&gt;&lt;TD&gt;Total Sales per Category 1 Clients&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123456789&lt;/TD&gt;&lt;TD&gt;Company A&lt;/TD&gt;&lt;TD&gt;3,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;234567891&lt;/TD&gt;&lt;TD&gt;Company B&lt;/TD&gt;&lt;TD&gt;4,000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible using DAX?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 06:01:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4234626#M167472</guid>
      <dc:creator>CJLastimosa07</dc:creator>
      <dc:date>2024-10-09T06:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Getting sum of a column of distinct rows from a filtered table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4234782#M167479</link>
      <description>&lt;P&gt;New calculated column&lt;/P&gt;&lt;PRE&gt;Total Sales per Category 1 Clients = &lt;BR /&gt;SUMX(&lt;BR /&gt;FILTER(&lt;BR /&gt;Connections,&lt;BR /&gt;Connections[Category] = 1 &amp;amp;&amp;amp; &lt;BR /&gt;Connections[Account Name] = EARLIER(Account[Account Name])&lt;BR /&gt;),&lt;BR /&gt;DISTINCT(Connections[Client ID]),&lt;BR /&gt;Connections[Sales]&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;Ensure that your tables have the correct relationships set up:&lt;/P&gt;&lt;P&gt;- Account Table: Account ID should relate to Account Name in both the Employee and Connections tables.&lt;BR /&gt;- Connections Table: Account Name should relate to the Account table based on the Account Name field.&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;P&gt;&lt;FONT color="#003366"&gt;If this helped, a &lt;SPAN&gt;Kudos &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/SPAN&gt; or a &lt;SPAN&gt;Solution mark&lt;/SPAN&gt; would be awesome! &lt;span class="lia-unicode-emoji" title=":party_popper:"&gt;🎉&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Kedar Pande&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/kedar-pande" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 07:31:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4234782#M167479</guid>
      <dc:creator>Kedar_Pande</dc:creator>
      <dc:date>2024-10-09T07:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Getting sum of a column of distinct rows from a filtered table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235844#M167544</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's giving me this error:&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 22:35:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235844#M167544</guid>
      <dc:creator>CJLastimosa07</dc:creator>
      <dc:date>2024-10-09T22:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Getting sum of a column of distinct rows from a filtered table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235881#M167549</link>
      <description>&lt;P&gt;Why is the Total for Company A 3000 ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Shouldnt it be 4000 ?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[Total Sales Measure]= CALCULATE(SUM(Connections[Sales]),Connections[Category]=1)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 09 Oct 2024 23:29:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235881#M167549</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-10-09T23:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting sum of a column of distinct rows from a filtered table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235893#M167552</link>
      <description>&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should only sum the sales for distinct clients of the company.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 23:39:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235893#M167552</guid>
      <dc:creator>CJLastimosa07</dc:creator>
      <dc:date>2024-10-09T23:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Getting sum of a column of distinct rows from a filtered table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235899#M167553</link>
      <description>&lt;P&gt;But what is the business rule to decide the value of Sales to be used in the calculation for a distinct client ?&lt;BR /&gt;&lt;BR /&gt;Lets assume Clinet Alpha has 2 unique Sales value&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Which one should be used 1000 or 2000 ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 23:59:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235899#M167553</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-10-09T23:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Getting sum of a column of distinct rows from a filtered table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235906#M167555</link>
      <description>&lt;P&gt;It's a column from another table (Clients). It's just added in the Connections table via LOOKUPVALUE, so it's always the same for the same client.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 00:06:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235906#M167555</guid>
      <dc:creator>CJLastimosa07</dc:creator>
      <dc:date>2024-10-10T00:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Getting sum of a column of distinct rows from a filtered table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235924#M167556</link>
      <description>&lt;P&gt;Create this measure :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Sales Measure = SUMX (VALUES(Connections[Client ID]),CALCULATE(MAX(Connections[Sales]),Connections[Category] = 1 ))&lt;/LI-CODE&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;</description>
      <pubDate>Thu, 10 Oct 2024 00:58:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235924#M167556</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-10-10T00:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting sum of a column of distinct rows from a filtered table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235960#M167558</link>
      <description>&lt;P&gt;It worked!&lt;BR /&gt;&lt;BR /&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 01:28:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-sum-of-a-column-of-distinct-rows-from-a-filtered-table/m-p/4235960#M167558</guid>
      <dc:creator>CJLastimosa07</dc:creator>
      <dc:date>2024-10-10T01:28:59Z</dc:date>
    </item>
  </channel>
</rss>

