<?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: Sales for the customers who bought Product A &amp;amp; B in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614810#M176606</link>
    <description>&lt;P&gt;Sumx(&lt;/P&gt;&lt;P&gt;Values(table[custID]),&lt;/P&gt;&lt;P&gt;Var products = calculatetable( values( tables[product] )&lt;/P&gt;&lt;P&gt;Return&amp;nbsp;&lt;/P&gt;&lt;P&gt;If( "A" in product &amp;amp;&amp;amp; "B" in products, table[sales])&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
    <pubDate>Tue, 18 Mar 2025 13:54:20 GMT</pubDate>
    <dc:creator>Deku</dc:creator>
    <dc:date>2025-03-18T13:54:20Z</dc:date>
    <item>
      <title>Sales for the customers who bought Product A &amp; B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614805#M176605</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate sum of sales for those customers who bought both the Product A &amp;amp; B. Please see the sample data expected output in the screenshot&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 13:45:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614805#M176605</guid>
      <dc:creator>rob_vander2</dc:creator>
      <dc:date>2025-03-18T13:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for the customers who bought Product A &amp; B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614810#M176606</link>
      <description>&lt;P&gt;Sumx(&lt;/P&gt;&lt;P&gt;Values(table[custID]),&lt;/P&gt;&lt;P&gt;Var products = calculatetable( values( tables[product] )&lt;/P&gt;&lt;P&gt;Return&amp;nbsp;&lt;/P&gt;&lt;P&gt;If( "A" in product &amp;amp;&amp;amp; "B" in products, table[sales])&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 13:54:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614810#M176606</guid>
      <dc:creator>Deku</dc:creator>
      <dc:date>2025-03-18T13:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for the customers who bought Product A &amp; B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614909#M176610</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1231947" data-lia-user-login="Deku" class="lia-mention lia-mention-user"&gt;Deku&lt;/a&gt;&amp;nbsp; I have got the below DAX as well&lt;BR /&gt;which one will be better?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR __custwithProductA = CALCULATETABLE(VALUES(Sales[CustID]), Sales[Product] ="A" )
VAR __custwithProductB = CALCULATETABLE(VALUES(Sales[CustID]), Sales[Product] ="B" )
VAR __CustwithProductA_B = INTERSECT(__custwithProductA,__custwithProductB)
VAR __Results = CALCULATE(SUM(Sales[Sales]), Sales[CustID] in __CustwithProductA_B)

RETURN __Results&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 Mar 2025 15:04:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614909#M176610</guid>
      <dc:creator>rob_vander2</dc:creator>
      <dc:date>2025-03-18T15:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for the customers who bought Product A &amp; B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614982#M176613</link>
      <description>&lt;P&gt;Product A&amp;amp;B Sales = CALCULATE(SUM(Sales[Sales]),FILTER,ALL(Sales[Product]), Sales[Product] in {“A”,”B”))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Please mark this post as solution if it helps you. Appreciate Kudos.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 16:00:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614982#M176613</guid>
      <dc:creator>andrewsommer</dc:creator>
      <dc:date>2025-03-18T16:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for the customers who bought Product A &amp; B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614993#M176614</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="197032" data-lia-user-login="andrewsommer" class="lia-mention lia-mention-user"&gt;andrewsommer&lt;/a&gt;&amp;nbsp; This will not work. It's goving all customers who purchase A or B. I want customers who purchased A &amp;amp; B.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 16:08:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4614993#M176614</guid>
      <dc:creator>rob_vander2</dc:creator>
      <dc:date>2025-03-18T16:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for the customers who bought Product A &amp; B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4615003#M176615</link>
      <description>&lt;P&gt;Hard to say. Would need to run in Dax studio and look at server timings. Doubt much difference&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 16:15:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4615003#M176615</guid>
      <dc:creator>Deku</dc:creator>
      <dc:date>2025-03-18T16:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for the customers who bought Product A &amp; B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4615115#M176618</link>
      <description>&lt;P&gt;You could also try this one below. Don't know if it is better then the one using the intersect, but prefer it over using SUMX.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE(SUM(Sales[Sales])
	,FILTER(VALUES(Sales[CustID]),AND(
		CALCULATE(COUNTROWS(Sales),Sales[Product]="A")&amp;gt;0
		,CALCULATE(COUNTROWS(Sales),Sales[Product]="B")&amp;gt;0
)))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 Mar 2025 17:36:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4615115#M176618</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2025-03-18T17:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sales for the customers who bought Product A &amp; B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4616890#M176675</link>
      <description>&lt;P&gt;This seems faster than other. Sumx is slower than all.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 16:43:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-for-the-customers-who-bought-Product-A-amp-B/m-p/4616890#M176675</guid>
      <dc:creator>rob_vander2</dc:creator>
      <dc:date>2025-03-19T16:43:17Z</dc:date>
    </item>
  </channel>
</rss>

