<?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: Calculating growth (compound interest) via measures in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-growth-compound-interest-via-measures/m-p/3150964#M112854</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="535252" data-lia-user-login="NathanFrederick" class="lia-mention lia-mention-user"&gt;NathanFrederick&lt;/a&gt;&amp;nbsp;Can you just use this?&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/dax/cumipmt-function-dax" target="_blank"&gt;CUMIPMT function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2023 20:00:01 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2023-03-23T20:00:01Z</dc:date>
    <item>
      <title>Calculating growth (compound interest) via measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-growth-compound-interest-via-measures/m-p/3150957#M112853</link>
      <description>&lt;P&gt;I am trying to come up with a measure that lets me calculate "compound interest" growth, which is applied every Friday.&lt;BR /&gt;&lt;BR /&gt;I've found a few solutions that work if I create tables - however, I need this to be measure based, as I have a number of different things that I need filter + have the results updated accordingly.&amp;nbsp; &amp;nbsp; &amp;nbsp;Depending on the chosen filters, I may have different start dates, end dates, and growth rates - and to do this via table creation would involve me creating dozens (possibly hundreds) of tables - which isn't really feasible.&lt;BR /&gt;&lt;BR /&gt;I have a number of measures which will return the appropriate start date/end date/start value/growth rates, based on the filters.&lt;BR /&gt;&lt;BR /&gt;I need to apply the growth rate every Friday, and have added a "Week ending Friday" column to my GlobalDate table.&lt;BR /&gt;&lt;BR /&gt;I'm fairly certain I need to be using ProductX for this, but I've not been able to get it to work correctly.&lt;BR /&gt;&lt;BR /&gt;I threw together what I would expect to see every Friday In Excel (and subsequent days until the after the next Friday, though the excel file only has the Friday values).&amp;nbsp; I'm ok with either having just Friday values, or daily values that change every Friday, however,&amp;nbsp;&lt;BR /&gt;my current Measure will return the correct value for the total, but not the rows.&lt;BR /&gt;&lt;BR /&gt;The Measure:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Growth_Measure = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;EndWeek&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;[GetGrowthEndWeek]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;StartWeek&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;[GetGrowthStartWeek]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;--VAR StartValue = GetGrowthStartValue&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;StartValue&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;100&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;--Use 100 easier for debugging&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;Result&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;StartValue&lt;/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t;/SPAN&gt;&lt;SPAN&gt;GlobalDate&lt;/SPAN&gt;&lt;SPAN&gt;[WeekEndingFri]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;EndWeek&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;And an image of what I'm trying to acheive/what I'm getting from this, and what the date table looks like / what the growth rate function is returning per-day.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance for help on this!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 19:55:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-growth-compound-interest-via-measures/m-p/3150957#M112853</guid>
      <dc:creator>NathanFrederick</dc:creator>
      <dc:date>2023-03-23T19:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating growth (compound interest) via measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-growth-compound-interest-via-measures/m-p/3150964#M112854</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="535252" data-lia-user-login="NathanFrederick" class="lia-mention lia-mention-user"&gt;NathanFrederick&lt;/a&gt;&amp;nbsp;Can you just use this?&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/dax/cumipmt-function-dax" target="_blank"&gt;CUMIPMT function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 20:00:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-growth-compound-interest-via-measures/m-p/3150964#M112854</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-03-23T20:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating growth (compound interest) via measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-growth-compound-interest-via-measures/m-p/3151006#M112856</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;&lt;BR /&gt;I'm not familiar with that function, but looking at it, I "feel" like I'm going to hit the same issue that led me to ProductX - I need to refer to "prior results" to get the next one.&lt;BR /&gt;&lt;BR /&gt;The growth rate often isn't constant (in my image you can see that it's 1.6% for the first 2 weeks, then it grows each week after that for this specific piece of the data), so I'm not sure how I'd feed this the appropriate data to make it work - I know all the parameters on the intial date/period, up until the growth rate changes, and then I'd need to feed the results of the first period into pv, and repeat each time the rate changes.&lt;BR /&gt;&lt;BR /&gt;If the growth rates were constant, this looks like it'd be ideal though, and I'll definitely remember it if I need a constant-growth approach &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 20:31:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-growth-compound-interest-via-measures/m-p/3151006#M112856</guid>
      <dc:creator>NathanFrederick</dc:creator>
      <dc:date>2023-03-23T20:31:07Z</dc:date>
    </item>
  </channel>
</rss>

