<?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: Average of beginning and ending total assets in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213015#M52280</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I do.&amp;nbsp; Please see below a screenshot:&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;</description>
    <pubDate>Tue, 30 Nov 2021 02:59:13 GMT</pubDate>
    <dc:creator>rwong1</dc:creator>
    <dc:date>2021-11-30T02:59:13Z</dc:date>
    <item>
      <title>Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2212640#M52253</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a formula to pull the values for 12/31 of the prior year based on the selected month end date.&amp;nbsp; I'm trying to do a formula for return on assets and the denominator requires the average of the beginning and ending total assets.&amp;nbsp; So if I select August 2021, the formula should pull in the total assets from August 2021 and December 2020 to do the average.&amp;nbsp; If I select June 2020, the formula should pull in June 2020's total assets and December 2019's.&amp;nbsp; I have the following but that is only pulling in the balance from last year based on the date selected and not December.&amp;nbsp; Please let me know.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Average of Total Assets = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Mo Cal Yr]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;[Total Assets]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;DATESINPERIOD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),-&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;YEAR&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 29 Nov 2021 20:07:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2212640#M52253</guid>
      <dc:creator>rwong1</dc:creator>
      <dc:date>2021-11-29T20:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2212747#M52258</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="288763" data-lia-user-login="rwong1" class="lia-mention lia-mention-user"&gt;rwong1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Average of Total Assets =
VAR _SD =
    MAX ( 'Date'[Date] )
VAR _LYED =
    DATE ( YEAR ( _SD ) - 1, 12, 31 )
RETURN
    CALCULATE (
        AVERAGEX ( VALUES ( 'Date'[Mo Cal Yr] ), [Total Assets] ),
        FILTER ( ALL ( 'Date' ), 'Date'[Date] &amp;gt; _LYED &amp;amp;&amp;amp; 'Date'[Date] &amp;lt;= _SD )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 22:32:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2212747#M52258</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-11-29T22:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2212757#M52259</link>
      <description>&lt;P&gt;Thanks for that.&amp;nbsp; I put that in there and it didn't give me the correct calculation.&amp;nbsp; Is there something else that I have to tweak?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 22:43:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2212757#M52259</guid>
      <dc:creator>rwong1</dc:creator>
      <dc:date>2021-11-29T22:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2212777#M52260</link>
      <description>&lt;P&gt;I want to emphasize that the total assets should only be from those 2 months.&amp;nbsp; I don't need anything pulled in between.&amp;nbsp; So if I select August 2021 from the slicer, it should only pull in August 2021 and December 2020 total assets to do the average, not from December 2020 thru August 2021.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 22:58:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2212777#M52260</guid>
      <dc:creator>rwong1</dc:creator>
      <dc:date>2021-11-29T22:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2212865#M52265</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="288763" data-lia-user-login="rwong1" class="lia-mention lia-mention-user"&gt;rwong1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have Month and Year columns in the Date table? Can you share a sample of your Date table here? I want to know the columns you have in that table to provide the better solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 01:14:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2212865#M52265</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-11-30T01:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213015#M52280</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I do.&amp;nbsp; Please see below a screenshot:&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;</description>
      <pubDate>Tue, 30 Nov 2021 02:59:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213015#M52280</guid>
      <dc:creator>rwong1</dc:creator>
      <dc:date>2021-11-30T02:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213041#M52283</link>
      <description>&lt;P&gt;I attached also the slicers that are in my model:&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;</description>
      <pubDate>Tue, 30 Nov 2021 03:24:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213041#M52283</guid>
      <dc:creator>rwong1</dc:creator>
      <dc:date>2021-11-30T03:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213086#M52287</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="288763" data-lia-user-login="rwong1" class="lia-mention lia-mention-user"&gt;rwong1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Average of Total Assets =
VAR _MSD =
    MAX ( 'Date'[MonthID] )
VAR _YSD =
    MAX ( 'Date'[Year] )
VAR _LYED = _YSD - 1
VAR _MED = 12
VAR _A =
    CALCULATE (
        AVERAGEX ( VALUES ( 'Date'[Mo Cal Yr] ), [Total Assets] ),
        FILTER ( ALL ( 'Date' ), 'Date'[MonthID] = 12 &amp;amp;&amp;amp; 'Date'[Year] = _LYED )
    )
VAR _B =
    CALCULATE (
        AVERAGEX ( VALUES ( 'Date'[Mo Cal Yr] ), [Total Assets] ),
        FILTER ( ALL ( 'Date' ), 'Date'[MonthID] = _MSD &amp;amp;&amp;amp; 'Date'[Year] = _YSD )
    )
RETURN
    _A + _B&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 04:20:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213086#M52287</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-11-30T04:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213094#M52288</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just tried that and it's still calculating incorrectly.&amp;nbsp; Is it because I have another measure that is the below?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Return on Assets = &lt;/SPAN&gt;&lt;SPAN&gt;[Net Profit]&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;[Average of Total Assets]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 30 Nov 2021 04:39:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213094#M52288</guid>
      <dc:creator>rwong1</dc:creator>
      <dc:date>2021-11-30T04:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213116#M52290</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="288763" data-lia-user-login="rwong1" class="lia-mention lia-mention-user"&gt;rwong1&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you post sample data as text and expected output?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;The most important parts are:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;BR /&gt;4. Relation between your tables&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;LinkedIn:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 05:13:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2213116#M52290</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-11-30T05:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2214306#M52346</link>
      <description>&lt;P&gt;Ok.&amp;nbsp; My total assets at 12/31/20 was&amp;nbsp;97,617,194.&amp;nbsp; My total assets at 10/31/21 was 123,224,867.&amp;nbsp; If I take the average of the 2, it comes out to 110,421,004.&amp;nbsp; The net income from Jan to Oct of 2021 was 4,491,961.&amp;nbsp; The return on assets should then be net income divided by average of the total assets which comes out to 110,421,004.&amp;nbsp; Therefore my return on assets should be 4.07%.&amp;nbsp; When using what you gave me, it came up to 2.03%.&amp;nbsp; The report I'm using is the one that formed the financials so I know it works.&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 15:00:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2214306#M52346</guid>
      <dc:creator>rwong1</dc:creator>
      <dc:date>2021-11-30T15:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Average of beginning and ending total assets</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2215197#M52410</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; This was correct.&amp;nbsp; I just needed to divide the sum by 2.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 02:46:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-beginning-and-ending-total-assets/m-p/2215197#M52410</guid>
      <dc:creator>rwong1</dc:creator>
      <dc:date>2021-12-01T02:46:06Z</dc:date>
    </item>
  </channel>
</rss>

