<?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: Summarize data calculated at bottom level in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2645178#M77808</link>
    <description>&lt;P&gt;create the new measure for summarize the table with sumx&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jul 2022 14:24:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-18T14:24:35Z</dc:date>
    <item>
      <title>Summarize data calculated at bottom level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2644283#M77766</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm stuck on this summarization problem:&lt;/P&gt;&lt;P&gt;I've a calculation with some conditions based on a Sales Table and I just want to aggregate by Customer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR selGoal = 5000 
VAR deltaYtd =
    IF ( [Act YTD] &amp;gt; selGoal, ( [Act YTD] - selGoal ) )
VAR deltaMon =
    CALCULATE ( [Act] - deltaYtd )
VAR lvl0Calc =
    CALCULATE (
        IF ( deltaYtd &amp;gt; 0, IF ( deltaMon &amp;lt; 0, 0, deltaMon ), [Act] ),
        FILTER ( 'Dim Customer', HASONEVALUE ( 'Dim Customer'[CUSTOMER_ID] ) )
    )
VAR result =
    SUMX (
        SUMMARIZE ( 'Dim Customer', 'Dim Customer'[Customer Desc], "value", lvl0Calc ),
        [value]
    )
RETURN
    result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above calculation should works at customer's maximum level of detail (customer_id) and&amp;nbsp; aggregated by "customer Desc"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The join between Sales and customer is by CUSTOMER_ID&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to perform the aggregation, for example Nutrilab 2.0 Srl should be 6784.&lt;/P&gt;&lt;P&gt;Any hint is appreciated,&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 10:44:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2644283#M77766</guid>
      <dc:creator>ribaldo</dc:creator>
      <dc:date>2022-07-18T10:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize data calculated at bottom level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2644970#M77797</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255893" data-lia-user-login="ribaldo" class="lia-mention lia-mention-user"&gt;ribaldo&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;First create a measure without this Say M1&lt;/P&gt;
&lt;P&gt;SUMX (&lt;BR /&gt;SUMMARIZE ( 'Dim Customer', 'Dim Customer'[Customer Desc], "value", lvl0Calc ),&lt;BR /&gt;[value]&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Then create a new measure and use above calculation using the measure(M1) you created without that and try&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 12:50:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2644970#M77797</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-07-18T12:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize data calculated at bottom level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2645052#M77799</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;I created a measure M1 :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;M1 = 
VAR selGoal = 5000 
VAR deltaYtd =
    IF ( [Act YTD] &amp;gt; selGoal, ( [Act YTD] - selGoal ) )
VAR deltaMon =
    CALCULATE ( [Act] - deltaYtd )
VAR lvl0Calc =
    CALCULATE (
        IF ( deltaYtd &amp;gt; 0, IF ( deltaMon &amp;lt; 0, 0, deltaMon ), [Act] ),
        FILTER ( 'Dim Customer', HASONEVALUE ( 'Dim Customer'[CUSTOMER_ID] ) )
    )
RETURN
    lvl0Calc&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then a M2 using M1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;M2 = 
    SUMX (
        SUMMARIZE ( 'Dim Customer', 'Dim Customer'[Customer Desc], "value", [M1] ),
        [value]
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But with no success:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I did something wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 13:23:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2645052#M77799</guid>
      <dc:creator>ribaldo</dc:creator>
      <dc:date>2022-07-18T13:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize data calculated at bottom level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2645178#M77808</link>
      <description>&lt;P&gt;create the new measure for summarize the table with sumx&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 14:24:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2645178#M77808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-18T14:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize data calculated at bottom level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2646665#M77880</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;I created the M2 measure that summarize M1, but it doesn't work:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 06:48:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-data-calculated-at-bottom-level/m-p/2646665#M77880</guid>
      <dc:creator>ribaldo</dc:creator>
      <dc:date>2022-07-19T06:48:25Z</dc:date>
    </item>
  </channel>
</rss>

