<?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: Sum of a calculated column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-a-calculated-column/m-p/2750712#M84861</link>
    <description>&lt;P&gt;The problem is I am expecting to get a number as the total (sum of a calculated column should be a number). I am not getting a number, I am getting a blank. So then when I try and caclulate the sum of xy, the y-intercept, and the slope I received blanks because the sum of x is blank. Lastly, when I try and plug everything into the regression formula, the result is blank because the above are blank.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My new approach is to append two queriers into 1 then use filter or if expressions to sum charts with an expense account number and revenues with revenue account numbers.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2022 15:57:31 GMT</pubDate>
    <dc:creator>james_pease</dc:creator>
    <dc:date>2022-09-06T15:57:31Z</dc:date>
    <item>
      <title>Sum of a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-a-calculated-column/m-p/2744414#M84488</link>
      <description>&lt;P&gt;Hello everyone, does anyone know how to calculate the sum of a calculated column? Im trying to create a few measures that use calculated columns for values but they are returning blanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here are my expressions:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;measure: &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;xsqrsum = &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;sum('All_Actual_Sales (2)'[xsq])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Calculated column being referenced:&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;xsq = if('All_Actual_Sales (2)'[LN Actual Sales]&amp;gt;0,('All_Actual_Sales (2)'[LN Actual Sales])^2)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Calculated column being referenced:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;LN Actual Sales = If('All_Actual_Sales (2)'[Actual Sales Null Values]&amp;gt;0,ln('All_Actual_Sales (2)'[Actual Sales Null Values]))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Measure:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;xsum = sumx( 'All_Actual_Sales (2)',[LN Actual Sales])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;Calculated column being referenced&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;LN Actual Sales = If('All_Actual_Sales (2)'[Actual Sales Null Values]&amp;gt;0,ln('All_Actual_Sales (2)'[Actual Sales Null Values]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;xysum = sum('All_Actual_Sales (2)'[xy])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;Calculated column being reference:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;xy = if('All_Actual_Sales (2)'[Actual Sales Null Values]&amp;gt;0, sum('All_Actual_Sales (2)'[LN Actual Sales])*sum('All_Actual_Expenses (2)'[Amount]))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Measure:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;y-intercept = Divide(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ysum]*[xsqrsum]-[xsum]*[ysum],&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [n]*[xsqrsum]-[xsum]^2)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;Calculated coulmns being referenced xsq and xy from above.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So I know my issues stem from not being able to sum the calculated columns.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Sep 2022 21:59:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-a-calculated-column/m-p/2744414#M84488</guid>
      <dc:creator>james_pease</dc:creator>
      <dc:date>2022-09-02T21:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-a-calculated-column/m-p/2744644#M84497</link>
      <description>&lt;P&gt;OK, you've shown your formulas but you have not shown were the problem really is... Calculated columns are normal columns in a table and they definitely can be used as any other column. Do you get any error? If so, why don't you show it?&lt;/P&gt;</description>
      <pubDate>Sat, 03 Sep 2022 08:12:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-a-calculated-column/m-p/2744644#M84497</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-09-03T08:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-a-calculated-column/m-p/2750712#M84861</link>
      <description>&lt;P&gt;The problem is I am expecting to get a number as the total (sum of a calculated column should be a number). I am not getting a number, I am getting a blank. So then when I try and caclulate the sum of xy, the y-intercept, and the slope I received blanks because the sum of x is blank. Lastly, when I try and plug everything into the regression formula, the result is blank because the above are blank.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My new approach is to append two queriers into 1 then use filter or if expressions to sum charts with an expense account number and revenues with revenue account numbers.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 15:57:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-of-a-calculated-column/m-p/2750712#M84861</guid>
      <dc:creator>james_pease</dc:creator>
      <dc:date>2022-09-06T15:57:31Z</dc:date>
    </item>
  </channel>
</rss>

