<?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 SUM from DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2879905#M93158</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have this code to get value by max date in rows.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;My problem: how can i sum all of this values?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Code:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;sales_latest = &lt;/SPAN&gt;&lt;SPAN&gt;Var&lt;/SPAN&gt;&lt;SPAN&gt; Max_date = &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(FuelHistory[EventTime])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; Latest_sales = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(FuelHistory[Fuel]), FuelHistory[EventTime]=Max_date)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;Return&lt;/SPAN&gt;&lt;SPAN&gt; Latest_sales&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please help!&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 02 Nov 2022 11:03:54 GMT</pubDate>
    <dc:creator>mantasp</dc:creator>
    <dc:date>2022-11-02T11:03:54Z</dc:date>
    <item>
      <title>SUM from DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2879905#M93158</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have this code to get value by max date in rows.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;My problem: how can i sum all of this values?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Code:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;sales_latest = &lt;/SPAN&gt;&lt;SPAN&gt;Var&lt;/SPAN&gt;&lt;SPAN&gt; Max_date = &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(FuelHistory[EventTime])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; Latest_sales = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(FuelHistory[Fuel]), FuelHistory[EventTime]=Max_date)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;Return&lt;/SPAN&gt;&lt;SPAN&gt; Latest_sales&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please help!&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Nov 2022 11:03:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2879905#M93158</guid>
      <dc:creator>mantasp</dc:creator>
      <dc:date>2022-11-02T11:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: SUM from DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2879947#M93164</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="277395" data-lia-user-login="mantasp" class="lia-mention lia-mention-user"&gt;mantasp&lt;/a&gt;&amp;nbsp;This looks like a measure totals problem. Very common. See my post about it here: &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 11:27:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2879947#M93164</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-11-02T11:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: SUM from DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2880088#M93173</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;thanks for your replay and for your websites.&lt;/P&gt;&lt;P&gt;First I have to find value by latest time and then sum it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 ID have 1-5 rows with price and&amp;nbsp; I need use only latest by date. My code is working, but when I want to sum it I can't&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 12:29:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2880088#M93173</guid>
      <dc:creator>mantasp</dc:creator>
      <dc:date>2022-11-02T12:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: SUM from DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2880163#M93185</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="277395" data-lia-user-login="mantasp" class="lia-mention lia-mention-user"&gt;mantasp&lt;/a&gt;&amp;nbsp;Right, so you have a working measure for the rows. What you need to do then is (easiest way) create a new measure that uses ISINSCOPE or HASONEVALUE. If you HASONEVALUE for a certain column then you are in a row and return your original measure. If you are not in a row (total) you then have to SUMMARIZE your data exactly as it appears in your table with your measure tacked on as a calculation and then you do a SUMX across that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can't be more specific because you haven't provided sample data, what your tables and columns are called and all that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And, if you find this incredibly frustrating, then vote for the idea I have linked in my signature.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 12:54:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2880163#M93185</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-11-02T12:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: SUM from DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2978953#M99817</link>
      <description>&lt;P&gt;Thank you, Greg Deckler&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 12:18:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-from-DAX/m-p/2978953#M99817</guid>
      <dc:creator>mantasp</dc:creator>
      <dc:date>2022-12-20T12:18:52Z</dc:date>
    </item>
  </channel>
</rss>

