<?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 Calculate Investors Payout over time in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Investors-Payout-over-time/m-p/2757666#M85331</link>
    <description>&lt;P&gt;hello everyone, i have a problem, first this is my pbix report&amp;nbsp;&lt;A href="https://1drv.ms/u/s!Ag9tIyk2ofNRjkB2irn8KlxTt-bj?e=x8mNvf" target="_blank" rel="noopener"&gt;https://1drv.ms/u/s!Ag9tIyk2ofNRjkB2irn8KlxTt-bj?e=x8mNvf&lt;/A&gt;&lt;BR /&gt;i made a table that shows my p/L report and i want next to it a table that shows the payout of investors. the pbix has everything you need but i will proviude with pictures to show you my desired result,&lt;BR /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;as you can see in example A, i chose the first week on my date tablw which is in 1/8/2022 till the following end of week.&lt;BR /&gt;then i made the calculations to how i want it,&lt;BR /&gt;&lt;BR /&gt;after that in example B, you can see I chose the following week so the calculated payout must become last weeks payout added to the new week one so last weeks payout becomes the new initial value if i make sense,&lt;BR /&gt;&lt;BR /&gt;final example is example C, which i jumped 2 weeks ahead so i want it to calculate the previous week which is week 3 to become the initial value and not week 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oh and i want to have on the investors table the last weeks payout too so the table visual on dax must look like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;investors&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;initial amount&amp;nbsp; &amp;nbsp; &amp;nbsp; percentage&amp;nbsp; &amp;nbsp; &amp;nbsp; last week payout&amp;nbsp; &amp;nbsp; this week payout&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;hope you can help me out&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2022 08:52:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-09-09T08:52:03Z</dc:date>
    <item>
      <title>Calculate Investors Payout over time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Investors-Payout-over-time/m-p/2757666#M85331</link>
      <description>&lt;P&gt;hello everyone, i have a problem, first this is my pbix report&amp;nbsp;&lt;A href="https://1drv.ms/u/s!Ag9tIyk2ofNRjkB2irn8KlxTt-bj?e=x8mNvf" target="_blank" rel="noopener"&gt;https://1drv.ms/u/s!Ag9tIyk2ofNRjkB2irn8KlxTt-bj?e=x8mNvf&lt;/A&gt;&lt;BR /&gt;i made a table that shows my p/L report and i want next to it a table that shows the payout of investors. the pbix has everything you need but i will proviude with pictures to show you my desired result,&lt;BR /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;as you can see in example A, i chose the first week on my date tablw which is in 1/8/2022 till the following end of week.&lt;BR /&gt;then i made the calculations to how i want it,&lt;BR /&gt;&lt;BR /&gt;after that in example B, you can see I chose the following week so the calculated payout must become last weeks payout added to the new week one so last weeks payout becomes the new initial value if i make sense,&lt;BR /&gt;&lt;BR /&gt;final example is example C, which i jumped 2 weeks ahead so i want it to calculate the previous week which is week 3 to become the initial value and not week 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oh and i want to have on the investors table the last weeks payout too so the table visual on dax must look like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;investors&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;initial amount&amp;nbsp; &amp;nbsp; &amp;nbsp; percentage&amp;nbsp; &amp;nbsp; &amp;nbsp; last week payout&amp;nbsp; &amp;nbsp; this week payout&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;hope you can help me out&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 08:52:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Investors-Payout-over-time/m-p/2757666#M85331</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-09T08:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Investors Payout over time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Investors-Payout-over-time/m-p/2757992#M85363</link>
      <description>&lt;P&gt;For further clarification the initial value miat only be used once for refer3nce to the new calculations so tjats why i only have it for specific date so august first inital is 10,000 for investor A and in the next day if i have positive net profit of 10,000 so x 10% is 1000, the new payout(initial value) should be 9000 from now on. I know its quite difficult to explain but i need your help guys&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 10:45:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Investors-Payout-over-time/m-p/2757992#M85363</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-09T10:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Investors Payout over time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Investors-Payout-over-time/m-p/2760805#M85567</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Payout = 
VAR Totalrevenue = Calculate(SUM(Revenue[Amount]),FILTER(ALL(DateTable),[Date]&amp;lt;Min('DateTable'[Date])))
Var Totalexpense = Calculate(SUM(Expenses[Amount]),FILTER(ALL(DateTable),[Date]&amp;lt;Min('DateTable'[Date])))
Var Grossprofit = (Totalrevenue - Totalexpense)
VAR Taxes = (Totalrevenue * 0.15)
VAR Netprofit = Grossprofit - Taxes
return MAX('Investors'[Initial Value])+Netprofit*MAX('Investors'[Percentage])

New Total Payout = 
VAR Totalrevenue = Calculate(SUM(Revenue[Amount]),FILTER(ALL(DateTable),[Date]&amp;lt;=MAX('DateTable'[Date])))
Var Totalexpense = Calculate(SUM(Expenses[Amount]),FILTER(ALL(DateTable),[Date]&amp;lt;=MAX('DateTable'[Date])))
Var Grossprofit = (Totalrevenue - Totalexpense)
VAR Taxes = (Totalrevenue * 0.15)
VAR Netprofit = Grossprofit - Taxes
return MAX('Investors'[Initial Value])+Netprofit*MAX('Investors'[Percentage])&lt;/LI-CODE&gt;
&lt;P&gt;Final output:&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;PS: I do not have access to your new sample, so I added a new table in your previous sample. If the result is not what you want, please provide with me more details or&amp;nbsp;share me with your pbix file after&amp;nbsp;&lt;STRONG&gt;removing sensitive data.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-provide-sample-data-in-the-Power-BI-Forum%2Fba-p%2F963216&amp;amp;data=05%7C01%7Cv-jianboli%40microsoft.com%7Ca7ce12be0f454896a61208da8034281b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637963258750159993%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=orVyE0%2FImc2MEFUqXtCveK0uf33594f67ZDxb8ybuNI%3D&amp;amp;reserved=0" target="_blank"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C01%7Cv-jianboli%40microsoft.com%7Ca7ce12be0f454896a61208da8034281b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637963258750159993%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=XocTq9o6TjxbxJqTak20E3kKp7q5HxKTNZef7xESMV0%3D&amp;amp;reserved=0" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Jianbo Li&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 03:19:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Investors-Payout-over-time/m-p/2760805#M85567</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2022-09-12T03:19:24Z</dc:date>
    </item>
  </channel>
</rss>

