<?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: Transformed Table Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/822115#M5652</link>
    <description>&lt;P&gt;Like all measures that act differently&amp;nbsp;than we think it should it's all about filter context. If we take the line for Item NN as an example:&lt;BR /&gt;The first part of your measure&lt;/P&gt;
&lt;PRE&gt;VAR _CustList =
    CALCULATETABLE ( DISTINCT ( 'Count'[Customer] ), 'Count'[Code] = 1 )&lt;/PRE&gt;
&lt;P&gt;gets the filter context of [Item] = NN (from the line in the visual) and you add the filter [Code] = 1. This returns a list of customers, in this case A, B, C (those are the only customers with [Item] NN and [Code] 1.&lt;/P&gt;
&lt;P&gt;Then the second line&lt;/P&gt;
&lt;PRE&gt;    CALCULATE ( 
        SUM ( 'Count'[Amount] ),
        'Count'[Customer] IN ( _CustList ),
        'Count'[Code] = 2)&lt;/PRE&gt;
&lt;P&gt;Calculates the SUM and applies 3 filters. &lt;BR /&gt;1. The [Item] filter from the visual of NN&lt;BR /&gt;2. The list from VAR _CustList: (A, B, C)&lt;BR /&gt;3. [Code] = 2 which only appears on lines for customers (D, E)&lt;/P&gt;
&lt;P&gt;So you are asking it to SUM ( 'Count'[Amount] ) for customers (A, B, C) from these lines:&lt;/P&gt;
&lt;TABLE width="468"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="117"&gt;Customer&lt;/TD&gt;
&lt;TD width="117"&gt;Code&lt;/TD&gt;
&lt;TD width="117"&gt;Item&lt;/TD&gt;
&lt;TD width="117"&gt;Amount&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;E&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;NN&lt;/TD&gt;
&lt;TD&gt;1400&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;D&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;NN&lt;/TD&gt;
&lt;TD&gt;1100&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;No lines match all the criteria so we get a blank.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2019 16:00:24 GMT</pubDate>
    <dc:creator>jdbuchanan71</dc:creator>
    <dc:date>2019-10-18T16:00:24Z</dc:date>
    <item>
      <title>Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820351#M5569</link>
      <description>&lt;P&gt;Hi Expert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have 2 measures that to transform table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Raw data is like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Code&lt;/TD&gt;&lt;TD&gt;Item&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;01&lt;/TD&gt;&lt;TD&gt;MM&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;01&lt;/TD&gt;&lt;TD&gt;NN&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;02&lt;/TD&gt;&lt;TD&gt;ZZ&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;01&lt;/TD&gt;&lt;TD&gt;MM&lt;/TD&gt;&lt;TD&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;01&lt;/TD&gt;&lt;TD&gt;NN&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;02&lt;/TD&gt;&lt;TD&gt;ZZ&lt;/TD&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;02&lt;/TD&gt;&lt;TD&gt;MM&lt;/TD&gt;&lt;TD&gt;650&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;01&lt;/TD&gt;&lt;TD&gt;MM&lt;/TD&gt;&lt;TD&gt;700&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;01&lt;/TD&gt;&lt;TD&gt;NN&lt;/TD&gt;&lt;TD&gt;800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;01&lt;/TD&gt;&lt;TD&gt;ZZ&lt;/TD&gt;&lt;TD&gt;900&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;02&lt;/TD&gt;&lt;TD&gt;MM&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;02&lt;/TD&gt;&lt;TD&gt;NN&lt;/TD&gt;&lt;TD&gt;1100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;02&lt;/TD&gt;&lt;TD&gt;ZZ&lt;/TD&gt;&lt;TD&gt;1200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;02&lt;/TD&gt;&lt;TD&gt;MM&lt;/TD&gt;&lt;TD&gt;1300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;02&lt;/TD&gt;&lt;TD&gt;NN&lt;/TD&gt;&lt;TD&gt;1400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;02&lt;/TD&gt;&lt;TD&gt;ZZ&lt;/TD&gt;&lt;TD&gt;1500&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure 1: Sum of 01&lt;BR /&gt;Measure 2: Sum of 02 (based on the customer have code "01")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to get the expected result as this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Sum of 01&lt;/TD&gt;&lt;TD&gt;Sum of 02&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MM&lt;/TD&gt;&lt;TD&gt;1200 (100+400+700)&lt;/TD&gt;&lt;TD&gt;650&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NN&lt;/TD&gt;&lt;TD&gt;1500&lt;BR /&gt;(200+500+800)&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ZZ&lt;/TD&gt;&lt;TD&gt;900&lt;/TD&gt;&lt;TD&gt;900 (300+600)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 04:10:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820351#M5569</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-17T04:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820371#M5571</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the first part. Not sure what you want for the second part. Will look at it again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;are nice too.&lt;BR /&gt;Nathaniel&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;&amp;nbsp;&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;PRE&gt;Sum of 1 = 
var _code = 1
var _calc = CALCULATE([Sum of Amount],'Count'[Code]=1)


return _calc&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 04:01:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820371#M5571</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-10-17T04:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820373#M5572</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shouldn't it be A2ZZ = 300&lt;/P&gt;&lt;P&gt;B2ZZ = 600 and B2MM = 650?&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 04:06:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820373#M5572</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-10-17T04:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820375#M5573</link>
      <description>&lt;P&gt;Oh, sorry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum of ZZ+02 should be (300+600)=900&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table is amended&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for correction&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 04:22:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820375#M5573</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-17T04:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820381#M5574</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Ok then! Added a column to check on whether the customer had 1. Here is my pbix.&amp;nbsp;&lt;A href="https://1drv.ms/u/s!AgCd7AyfqZtEyFi62zu5uFanxPnM?e=zBPCfU" target="_blank" rel="noopener"&gt;Count of 1 and 2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sum of 2 = 

var _code = 2
var _calc = CALCULATE([Sum of Amount],'Count'[Code]=2,'Count'[IF Customer has 1]&amp;gt;=1)


return _calc&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 04:22:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820381#M5574</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-10-17T04:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820382#M5575</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Calculated column is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IF Customer has 1 = CALCULATE(COUNTROWS('Count'),FILTER(ALLEXCEPT('Count','Count'[Customer]),'Count'[Code]=1))&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 04:25:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820382#M5575</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-10-17T04:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820383#M5576</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;, It's help, Great thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 04:25:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820383#M5576</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-17T04:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820398#M5578</link>
      <description>&lt;P&gt;May I ask further, It is possible that not create a column to do so?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 04:48:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/820398#M5578</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-17T04:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/821318#M5623</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This is the new Sum of 2, which does not need the Calculated Column.&amp;nbsp; Had to go to another guy on the leaderboards&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="106637" data-lia-user-login="jdbuchanan71" class="lia-mention lia-mention-user"&gt;jdbuchanan71&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Whew!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sum of 2 =
VAR _CustList =
    CALCULATETABLE (
        INTERSECT (
            CALCULATETABLE ( DISTINCT ( 'Count'[Customer] ), 'Count'[Code] = 1 ),
            CALCULATETABLE ( DISTINCT ( 'Count'[Customer] ), 'Count'[Code] = 2 )
        ),
        ALLEXCEPT ( 'Count', 'Count'[Customer] )
    )
RETURN
    CALCULATE (
        SUM ( 'Count'[Amount] ),
        'Count'[Customer] IN ( _CustList ),
        KEEPFILTERS ( 'Count'[Code] = 2 )
    )&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Oct 2019 21:40:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/821318#M5623</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-10-17T21:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/821419#M5631</link>
      <description>&lt;P&gt;Perfect, exactly what I want, thanks so much&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 01:37:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/821419#M5631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-18T01:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/821612#M5636</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is equation I modified.&lt;/P&gt;&lt;PRE&gt;Sum of 2 (New) = 
VAR _CustList =
    CALCULATETABLE ( DISTINCT ( 'Count'[Customer] ), 'Count'[Code] = 1 )
RETURN
    CALCULATE ( 
        SUM ( 'Count'[Amount] ),
        'Count'[Customer] IN ( _CustList ),
        'Count'[Code] = 2)&lt;/PRE&gt;&lt;P&gt;I'm so curious why it's empty for (ZZ, Sum of 2 (New) ) and the total is correct, it's very very strange. how come?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 07:07:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/821612#M5636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-18T07:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/822016#M5647</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;We ran into the same thing.&lt;/P&gt;&lt;P&gt;Here is the first solution and the subsequent solution that&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="106637" data-lia-user-login="jdbuchanan71" class="lia-mention lia-mention-user"&gt;jdbuchanan71&lt;/a&gt;&amp;nbsp;sent.&amp;nbsp; The first one had exactly the same issue. Not sure why.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;First one:
Measure = 
VAR _CustList = 
    INTERSECT (
        CALCULATETABLE (
            DISTINCT ( 'Count'[Customer] ), 'Count'[Code] = 1),
        CALCULATETABLE (
            DISTINCT ( 'Count'[Customer] ), 'Count'[Code] = 2)
    )
RETURN
    CALCULATE ( 
        SUM ( 'Count'[Amount] ),
        'Count'[Customer] IN ( _CustList ),
        KEEPFILTERS( 'Count'[Code] = 2 )
    ) 

Second one:
Measure = 
VAR _CustList = 
CALCULATETABLE(
    INTERSECT (
        CALCULATETABLE (
            DISTINCT ( 'Count'[Customer] ), 'Count'[Code] = 1),
        CALCULATETABLE (
            DISTINCT ( 'Count'[Customer] ), 'Count'[Code] = 2)
    )
    ,ALLEXCEPT('Count','Count'[Customer])
)
RETURN
    CALCULATE ( 
        SUM ( 'Count'[Amount] ),
        'Count'[Customer] IN ( _CustList )
        ,KEEPFILTERS( 'Count'[Code] = 2 )
    ) &lt;/PRE&gt;&lt;P&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 14:27:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/822016#M5647</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-10-18T14:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Transformed Table Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/822115#M5652</link>
      <description>&lt;P&gt;Like all measures that act differently&amp;nbsp;than we think it should it's all about filter context. If we take the line for Item NN as an example:&lt;BR /&gt;The first part of your measure&lt;/P&gt;
&lt;PRE&gt;VAR _CustList =
    CALCULATETABLE ( DISTINCT ( 'Count'[Customer] ), 'Count'[Code] = 1 )&lt;/PRE&gt;
&lt;P&gt;gets the filter context of [Item] = NN (from the line in the visual) and you add the filter [Code] = 1. This returns a list of customers, in this case A, B, C (those are the only customers with [Item] NN and [Code] 1.&lt;/P&gt;
&lt;P&gt;Then the second line&lt;/P&gt;
&lt;PRE&gt;    CALCULATE ( 
        SUM ( 'Count'[Amount] ),
        'Count'[Customer] IN ( _CustList ),
        'Count'[Code] = 2)&lt;/PRE&gt;
&lt;P&gt;Calculates the SUM and applies 3 filters. &lt;BR /&gt;1. The [Item] filter from the visual of NN&lt;BR /&gt;2. The list from VAR _CustList: (A, B, C)&lt;BR /&gt;3. [Code] = 2 which only appears on lines for customers (D, E)&lt;/P&gt;
&lt;P&gt;So you are asking it to SUM ( 'Count'[Amount] ) for customers (A, B, C) from these lines:&lt;/P&gt;
&lt;TABLE width="468"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="117"&gt;Customer&lt;/TD&gt;
&lt;TD width="117"&gt;Code&lt;/TD&gt;
&lt;TD width="117"&gt;Item&lt;/TD&gt;
&lt;TD width="117"&gt;Amount&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;E&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;NN&lt;/TD&gt;
&lt;TD&gt;1400&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;D&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;NN&lt;/TD&gt;
&lt;TD&gt;1100&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;No lines match all the criteria so we get a blank.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 16:00:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Transformed-Table-Measure/m-p/822115#M5652</guid>
      <dc:creator>jdbuchanan71</dc:creator>
      <dc:date>2019-10-18T16:00:24Z</dc:date>
    </item>
  </channel>
</rss>

