<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>calculation</title><link>https://community.appian.com/discussions/f/general/34686/calculation</link><description>here in the image 
 1st, 2nd and 3rd columns are input and it has to generate the 4th, 5th and 6th column 
 can anyone help me with this 
 4th column will be calculated with 3rd column/1st column 
 5th is minus of 4th column 
 6th is increment of 1 year</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: calculation</title><link>https://community.appian.com/thread/133547?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 12:08:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b0167d49-7f9d-4d5b-b911-be6030f5311c</guid><dc:creator>venkatrea696188</dc:creator><description>&lt;p&gt;What happens when last iteration of ri!years not gives 0? You said iterate untill&amp;nbsp; column E reaches 0?&lt;/p&gt;
[quote userid="68553" url="~/discussions/f/general/34686/calculation/133530"]&lt;p&gt;so we have to calculate until amount comes to 0, by incrementing every year&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133546?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 12:04:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:012d6608-d096-44f3-9b77-a0e6a175c23b</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1713268950472v1.png" alt=" " /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;a!forEach(
  items: enumerate(ri!years) + 1,
  expression: {
    a!localVariables(
      local!calculateDepreciationAmt: ri!actualAmount / ri!years,
      local!marketValue: ri!actualAmount - (local!calculateDepreciationAmt * fv!item),
      local!depreciationDate: todate(
        datetime(
          year(tostring(ri!registrationDate_dt)) + fv!item,
          month(tostring(ri!registrationDate_dt)),
          day(tostring(ri!registrationDate_dt))
        )
      ),
      {
        local!calculateDepreciationAmt,
        local!depreciationDate,
        local!marketValue
      }
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133545?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 11:32:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3f376681-06e8-4414-98a6-8921364872c4</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;we are not using the RPA&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133539?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 11:00:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1b5adb9d-ac88-4de5-b41f-c290c8388a11</guid><dc:creator>venkatrea696188</dc:creator><description>&lt;p&gt;While loop is not available in Appian expressions , you need to create a process model&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/24.1/looping.html#while-loop"&gt;While loop in Appian&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133538?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 10:58:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cb2389ae-c434-4f7e-aedb-bc9f004340b1</guid><dc:creator>Karumuru Abhishek</dc:creator><description>&lt;p&gt;Can we have&amp;nbsp; a stored procedure for this logic will that be easy ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133530?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 10:10:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aa8d81fd-abb8-446d-8e55-00b81d788816</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;the input will be example&amp;nbsp;&lt;/p&gt;
&lt;p&gt;years - 5&lt;/p&gt;
&lt;p&gt;amount - 10000&lt;/p&gt;
&lt;p&gt;initial year - 1st feb 2024&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;so we have to calculate until amount comes to 0, by incrementing every year&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1713262563772v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133526?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 09:46:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6aa4b73c-bed2-471c-a2a2-4c2bc14f49b1</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;Hello &lt;a href="/members/kavyam0002"&gt;KM&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I try to mimic your requirement using map function but you can create CDT or Record according to your need and save this into DB.&lt;br /&gt;Below is my understanding&lt;br /&gt;For each row, Dividing the value in column D by the value in column B. Then, subtracting&amp;nbsp; column E from the value in column D. Finally, it increments the date in column F by one year.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: {
    a!map(
      &amp;quot;COLB&amp;quot;: 5,
      &amp;quot;COLC&amp;quot;: &amp;quot;02/01/2024&amp;quot;,
      &amp;quot;COLD&amp;quot;: 10000,
      &amp;quot;COLE&amp;quot;: 2000,
      &amp;quot;COLF&amp;quot;: 8000,
      &amp;quot;COLG&amp;quot;: &amp;quot;01/31/2029&amp;quot;
    ),
    a!map(
      &amp;quot;COLB&amp;quot;: 3,
      &amp;quot;COLC&amp;quot;: &amp;quot;02/01/2024&amp;quot;,
      &amp;quot;COLD&amp;quot;: 10000,
      &amp;quot;COLE&amp;quot;: 2000,
      &amp;quot;COLF&amp;quot;: 8000,
      &amp;quot;COLG&amp;quot;: &amp;quot;01/31/2029&amp;quot;
    )
  },
  a!forEach(
    items: local!data,
    expression: a!update(
      fv!item,
      { &amp;quot;COLE&amp;quot;, &amp;quot;COLF&amp;quot;, &amp;quot;COLG&amp;quot; },
      {
        fv!item.COLD / fv!item.COLB,
        fv!item.COLD - (fv!item.COLD / fv!item.COLB),
        todate(
          datetime(
            year(tostring(fv!item.COLC)) + 1,
            month(tostring(fv!item.COLC)),
            day(tostring(fv!item.COLC))
          )
        )
      }
    )
  )
)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let me know if that works for you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133520?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 09:10:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:680956de-27e4-4ae1-8ba0-3fc69825f643</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;yes, first 3 columns are input based on input next 3 are calculating- storing to be i&amp;nbsp;do it&amp;nbsp;in the PM&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133519?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 09:07:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4a9cd1e0-4f0e-49cc-bc3f-cae85bd552a0</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;What do you mean by doing it in expression rule and store in db? Do you want to create an expression rule that performs the calculation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133517?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 08:43:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d30a41c5-4d9a-4bf1-bc87-18dbd7d3868b</guid><dc:creator>Karumuru Abhishek</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/kavyam0002"&gt;KM&lt;/a&gt;&amp;nbsp; I am still unable to capture your requirement could you please share your code snippet for better understanding&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133515?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 08:33:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:41db2ec9-ffc6-4017-a7d1-14918d48a535</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;doing it in expression rule and result will be stored in DB&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: calculation</title><link>https://community.appian.com/thread/133512?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 07:46:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ddfff022-ee38-4f60-b6a2-1d3b50826486</guid><dc:creator>Karumuru Abhishek</dc:creator><description>&lt;p&gt;hi &lt;a href="/members/kavyam0002"&gt;KM&lt;/a&gt;&amp;nbsp; are trying to do this in excel sheet or appian grid filed&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>