<?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: When to use Sum and Sumx in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3243596#M119406</link>
    <description>&lt;P&gt;SUM vs. SUMX:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SUM: The SUM function is an aggregation function that calculates the sum of a column or expression within a single table or filter context. It works on a column and returns the sum of all the values in that column.&lt;/LI&gt;&lt;LI&gt;SUMX: The SUMX function is an iterator function that allows you to perform a calculation (such as summing values) for each row of a table or an expression within a specific context. It works on an iterator table and applies the specified calculation to each row, and then aggregates the results.&lt;/LI&gt;&lt;LI&gt;AVERAGE vs. AVERAGEX:&lt;UL&gt;&lt;LI&gt;AVERAGE: The AVERAGE function is an aggregation function that calculates the average of a column or expression within a single table or filter context. It works on a column and returns the average value of all the values in that column.&lt;/LI&gt;&lt;LI&gt;AVERAGEX: The AVERAGEX function is an iterator function that allows you to perform a calculation (such as averaging values) for each row of a table or an expression within a specific context. It works on an iterator table and applies the specified calculation to each row, and then aggregates the results.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Fri, 19 May 2023 04:35:14 GMT</pubDate>
    <dc:creator>AjithPrasath</dc:creator>
    <dc:date>2023-05-19T04:35:14Z</dc:date>
    <item>
      <title>When to use Sum and Sumx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3243306#M119384</link>
      <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have read so many articles but not able to understand when someone should use Sum and SumX , Average and AverageX.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain with basic example&amp;nbsp; ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 01:39:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3243306#M119384</guid>
      <dc:creator>koolsid786</dc:creator>
      <dc:date>2023-05-19T01:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: When to use Sum and Sumx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3243321#M119387</link>
      <description>&lt;P&gt;This reference guide gives some good examples:&amp;nbsp;&lt;A href="https://dax.guide/sumx/" target="_blank" rel="noopener"&gt;https://dax.guide/sumx/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First examples shows similarities:&lt;/P&gt;&lt;DIV class=""&gt;--&amp;nbsp; SUM is the short version of SUMX, when used with one column only&lt;/DIV&gt;&lt;DIV class=""&gt;--&amp;nbsp; SUMX is required to evaluate formulas, instead of columns&lt;/DIV&gt;</description>
      <pubDate>Fri, 19 May 2023 01:51:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3243321#M119387</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-19T01:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: When to use Sum and Sumx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3243443#M119397</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="536401" data-lia-user-login="koolsid786" class="lia-mention lia-mention-user"&gt;koolsid786&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can use the x aggregators when you need to get access to row context otherwise just use normal SUM, AVERAGE etc.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 02:48:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3243443#M119397</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-19T02:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: When to use Sum and Sumx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3243596#M119406</link>
      <description>&lt;P&gt;SUM vs. SUMX:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SUM: The SUM function is an aggregation function that calculates the sum of a column or expression within a single table or filter context. It works on a column and returns the sum of all the values in that column.&lt;/LI&gt;&lt;LI&gt;SUMX: The SUMX function is an iterator function that allows you to perform a calculation (such as summing values) for each row of a table or an expression within a specific context. It works on an iterator table and applies the specified calculation to each row, and then aggregates the results.&lt;/LI&gt;&lt;LI&gt;AVERAGE vs. AVERAGEX:&lt;UL&gt;&lt;LI&gt;AVERAGE: The AVERAGE function is an aggregation function that calculates the average of a column or expression within a single table or filter context. It works on a column and returns the average value of all the values in that column.&lt;/LI&gt;&lt;LI&gt;AVERAGEX: The AVERAGEX function is an iterator function that allows you to perform a calculation (such as averaging values) for each row of a table or an expression within a specific context. It works on an iterator table and applies the specified calculation to each row, and then aggregates the results.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 19 May 2023 04:35:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3243596#M119406</guid>
      <dc:creator>AjithPrasath</dc:creator>
      <dc:date>2023-05-19T04:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: When to use Sum and Sumx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3245636#M119567</link>
      <description>&lt;P&gt;Hi Ajith,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please explain with Example ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally I am facing dificultiies in generating Dax formulas how to practice those ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For Ex. In the below screen shot I have used Distinct but the Asnwer is showing that we should use Summarize ? Which function to be used when how to understand those ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 May 2023 00:24:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3245636#M119567</guid>
      <dc:creator>koolsid786</dc:creator>
      <dc:date>2023-05-21T00:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: When to use Sum and Sumx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3245639#M119568</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;I am facing dificultiies in generating Dax formulas how to practice those ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For Ex. In the below screen shot I have used Distinct but the Asnwer is showing that we should use Summarize ? Which function to be used when how to understand those ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&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;&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;</description>
      <pubDate>Sun, 21 May 2023 00:26:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3245639#M119568</guid>
      <dc:creator>koolsid786</dc:creator>
      <dc:date>2023-05-21T00:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: When to use Sum and Sumx</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3246515#M119615</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="536401" data-lia-user-login="koolsid786" class="lia-mention lia-mention-user"&gt;koolsid786&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SUM function:&lt;/STRONG&gt; The SUM function calculates the sum of a specified column in a table. It takes a column or an expression that evaluates to a column as an argument.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SUM(&amp;lt;column&amp;gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Example: &lt;/SPAN&gt;&lt;/STRONG&gt;Consider a table called "Sales" with columns "Product" and "SalesAmount." To calculate the total sales amount, you can use the SUM function as follows:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;TotalSalesAmount = SUM(Sales[SalesAmount])&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SUMX function:&lt;/STRONG&gt; The SUMX function calculates the sum of an expression for each row in a table or an iterator. It iterates over each row and performs the specified calculation on the expression.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SUMX(&amp;lt;table&amp;gt;, &amp;lt;expression&amp;gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Example: &lt;/SPAN&gt;&lt;/STRONG&gt;Suppose you have a table called "Orders" with columns "Product," "Quantity," and "Price." To calculate the total revenue for each product (quantity multiplied by price), you can use the SUMX function as follows:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TotalRevenue = SUMX(Orders, Orders[Quantity] * Orders[Price])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This will iterate over each row in the "Orders" table, calculate the revenue for each row (Quantity * Price), and then sum up the results to provide the total revenue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Ajith Prasath&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this post helps, then please consider &lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 05:52:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/When-to-use-Sum-and-Sumx/m-p/3246515#M119615</guid>
      <dc:creator>AjithPrasath</dc:creator>
      <dc:date>2023-05-22T05:52:11Z</dc:date>
    </item>
  </channel>
</rss>

