<?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: DAX Calculatation on new proportional interest rate change from Old to New interest rate change date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3800582#M148575</link>
    <description>&lt;P&gt;Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?&lt;/P&gt;</description>
    <pubDate>Sat, 30 Mar 2024 23:42:52 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-03-30T23:42:52Z</dc:date>
    <item>
      <title>DAX Calculatation on new proportional interest rate change from Old to New interest rate change date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3799048#M148507</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here are more details about the&amp;nbsp;New&amp;nbsp;proportional interest rate change calculation that needs to be done. Please help&lt;/P&gt;&lt;P&gt;Sample Data looks like the below table: I'm unable to create a table here getting an HTML error below is the screenshot for reference.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above table last two records are new interest rate changes on the sample data and calculations need to be worked. Please find below a calculation example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1st Record : INT_RT_ID : &lt;STRONG&gt;TDSRVB&lt;/STRONG&gt;&lt;BR /&gt;Interest Rate : 0.5 %&lt;BR /&gt;0.05÷100=0.0005&lt;BR /&gt;0.0005 × 6 ÷ 12 = 0.00025 --&amp;gt; LAST_INST_CAPTIL (2023/7) - LAST_UPDATED (2024/1) = 6 Months&lt;BR /&gt;SURVIVAL : [SURV_DEFR_INT_AMT (10000) + [SURV_DEFR_DIV_AMT (100)]&lt;BR /&gt;Settlement interest: (10000+100)x 0.00025 = 2 (rounded to the nearest yen)&lt;BR /&gt;&lt;BR /&gt;------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;2nd Record : INT_RT_ID : &lt;STRONG&gt;MLJDIV&lt;/STRONG&gt;&lt;BR /&gt;Interest Rate : 0.25 %&lt;BR /&gt;0.25÷100=0.0025&lt;BR /&gt;0.0025 × 6 ÷ 12 = 0.00125 --&amp;gt; LAST_INST_CAPTIL (2023/7) - LAST_UPDATED (2024/1) = 6 Months&lt;BR /&gt;SURVIVAL : [SURV_DEFR_INT_AMT (10000) + [SURV_DEFR_DIV_AMT (100)]&lt;BR /&gt;Settlement interest: (10000+100)x 0.00125 = 12 (rounded to the nearest yen)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The above calculations are old interest rates on TDSRVB &amp;amp; MLJDIV. &lt;STRONG&gt;Below are the proportional interest rate changes on DHYSRV.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Here Calculation needs to be calculate dynamically on only Dates LAST_INST_CAPTIL, INT_RT_EFF_DT, and INT_RT_EFF_DT. Interest rates and Policy IDs may be different not fixed.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;LAST_INST_CAPTIL : 2023/7&lt;BR /&gt;&lt;BR /&gt;1st Interest changed from 0.10 to 0.20&lt;BR /&gt;&lt;BR /&gt;INT_RT_EFF_DT : 2023/10&lt;BR /&gt;&lt;BR /&gt;2nd Interest changed from 0.20 to 0.25&lt;BR /&gt;&lt;BR /&gt;INT_RT_EFF_DT : 2023/11&lt;BR /&gt;&lt;BR /&gt;LAST_UPDATED : 2024/1&lt;BR /&gt;&lt;BR /&gt;1st interest : 0.0010X3 ÷12= 0.0003(round off to four decimal place) --&amp;gt; LAST_INST_CAPTIL (2023/7) - INT_RT_EFF_DT (2023/10) 3&lt;BR /&gt;&lt;BR /&gt;2nd interest : 0.0020X1 ÷12= 0.0002(round off to four decimal place) --&amp;gt; INT_RT_EFF_DT (2023/10) - INT_RT_EFF_DT (2023/11) = 1&lt;BR /&gt;&lt;BR /&gt;3rd interest : 0.0025X2 ÷12=0.0004(round off to four decimal place) --&amp;gt; --&amp;gt; INT_RT_EFF_DT (2023/11) - LAST_UPDATED (2024/1) = 2&lt;BR /&gt;&lt;BR /&gt;SURVIVAL : [SURV_DEFR_INT_AMT (10000) + [SURV_DEFR_DIV_AMT (100)] --&amp;gt; next to the POlicy_ID&lt;BR /&gt;&lt;BR /&gt;Settlement interest: (10000+100)×0.0003+(10000+100)×0.0002+(10000+100)×0.0004 =3.03+2.02+4.04=9.09 (Round off) =9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FINAL OUTPUT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 12:04:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3799048#M148507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-29T12:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculatation on new proportional interest rate change from Old to New interest rate change date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3800582#M148575</link>
      <description>&lt;P&gt;Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2024 23:42:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3800582#M148575</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-30T23:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculatation on new proportional interest rate change from Old to New interest rate change date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3800930#M148600</link>
      <description>&lt;OL&gt;&lt;LI&gt;To aim this report to achieve the latest effective interest change from the previous date to the current date&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;The above calculation formula will be applicable when the interest revision happens during the fiscal year. In this case, proportional interest rate calculation needs to be done.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;I have tried different approaches and methods to work on the difference between the two dates to get the month's count. As I requested in the previous post:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-between-the-PRevious-month-count-and-Current-Month/m-p/3798787#M148483" target="_self"&gt;(Difference between the PRevious month count and Current Month count).&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;But in this post above &lt;STRONG&gt;FINAL OUTPIT&lt;/STRONG&gt; screenshot is the table visual to show the result on &lt;STRONG&gt;"DIFFERENCE MONTHS COUNT", "PROPORTIONAL" and "SETTLEMENT CALCULATION"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;I have stuck in the &lt;STRONG&gt;"&lt;SPAN class=""&gt;DIFFERENCE MONTHS COUNT"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&amp;nbsp;calculations. Please help me.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Below is the DAX I have tried in Power BI&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt; DAX:&amp;nbsp;&lt;SPAN class=""&gt;DATEDIFF('Sample 3'[LAST_INST_CAPTIL],'Sample 3'[INT_RT_EFF_DT],MONTH)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2024 18:12:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3800930#M148600</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-31T18:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculatation on new proportional interest rate change from Old to New interest rate change date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3801746#M148646</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;,Thanks for the quick reply, I'll add to it.&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The Table data is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Please follow these steps:&lt;BR /&gt;1.&amp;nbsp;Creating Indexed Columns with Power Query&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2.Use the following DAX expression to create a column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = IF('Table'[INT_RT_ID] = "DHYSRV",
SWITCH(TRUE(),
'Table'[Index] = 3,'Table'[LAST_INST_CAPTIL],
'Table'[Index] = 4,'Table'[INT_RT_EFF_DT],
'Table'[Index] = 5,'Table'[INT_RT_EFF_DT]),
SWITCH(TRUE(),
'Table'[INT_RT_ID] = "TDSRVB",'Table'[LAST_INST_CAPTIL],
'Table'[INT_RT_ID] = "MLJDIV",'Table'[LAST_INST_CAPTIL]))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3.Use the following DAX expression to create a column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column 2 = IF('Table'[INT_RT_ID] = "DHYSRV",
SWITCH(TRUE(),
'Table'[Index] = 3,SUMX(FILTER('Table','Table'[Index] = 4 ),'Table'[INT_RT_EFF_DT]),
'Table'[Index] = 4,SUMX(FILTER('Table','Table'[Index] = 5 ),'Table'[INT_RT_EFF_DT]),
'Table'[Index] = 5,'Table'[LAST_UPDATED]),
SWITCH(TRUE(),
'Table'[INT_RT_ID] = "TDSRVB",'Table'[LAST_UPDATED],
'Table'[INT_RT_ID] = "MLJDIV",'Table'[LAST_UPDATED]))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;4.Use the following DAX expression to create a measure named 'Final output'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Final output = 
 VAR _a =  CALCULATE(TRUNC(SUMX(FILTER('Table','Table'[Index] = 3),ROUND(('Table'[INIT_DPOS_INT_PCT] / 100  * DATEDIFF('Table'[Column],'Table'[Column 2],MONTH) / 12),4) * ('Table'[SURV_DEFR_INT_AMT] + 'Table'[SURV_DEFR_DIV_AMT]))),ALL('Table'))
 VAR _b = CALCULATE(TRUNC(SUMX(FILTER('Table','Table'[Index] = 4),ROUND(('Table'[INIT_DPOS_INT_PCT] / 100  * DATEDIFF('Table'[Column],'Table'[Column 2],MONTH) / 12),4) * ('Table'[SURV_DEFR_INT_AMT] + 'Table'[SURV_DEFR_DIV_AMT]))),ALL('Table'))
 VAR _c = CALCULATE(TRUNC(SUMX(FILTER('Table','Table'[Index] = 5),ROUND(('Table'[INIT_DPOS_INT_PCT] / 100  * DATEDIFF('Table'[Column],'Table'[Column 2],MONTH) / 12),4) * ('Table'[SURV_DEFR_INT_AMT] + 'Table'[SURV_DEFR_DIV_AMT]))),ALL('Table'))
 RETURN
IF(SELECTEDVALUE('Table'[INT_RT_ID]) = "MLJDIV" || SELECTEDVALUE('Table'[INT_RT_ID]) = "TDSRVB",
 TRUNC(SELECTEDVALUE('Table'[INIT_DPOS_INT_PCT]) / 100 * DATEDIFF(SELECTEDVALUE('Table'[Column]),SELECTEDVALUE('Table'[Column 2]),MONTH) / 12 * (SELECTEDVALUE('Table'[SURV_DEFR_INT_AMT]) + SELECTEDVALUE('Table'[SURV_DEFR_DIV_AMT]))),
_a+_b+_c)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;5.Final output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Wenbin Zhou&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 09:12:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3801746#M148646</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-01T09:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculatation on new proportional interest rate change from Old to New interest rate change date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3802309#M148663</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;, Thank you so much for your solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Today when I'm working on your DAX solution. I have loaded the data into the PBI desktop and got a lot of records from my Database. Please help&lt;BR /&gt;Can we calculate in DAX without adding the &lt;STRONG&gt;"INDEX"&lt;/STRONG&gt; column from Power Query? Because the number of records is almost more than 1K. Below is the screenshot for your reference.&lt;STRONG&gt; I am unable to upload the .pbix file here&lt;/STRONG&gt;. Please help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 12:21:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3802309#M148663</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-01T12:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculatation on new proportional interest rate change from Old to New interest rate change date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3803446#M148710</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Regarding your question,If you plan to use only the 'LAST_INST_CAPTIL' and 'LAST_UPDATED' columns of the current row to calculate the number of months of variance, you can do so without creating index columns.Since the 'POLCY_ID' value is not unique, we need to create unique index columns to determine which corresponding row data to use for calculating the month difference.If you think there is too much data, you can filter the required data in Power Query and then create the index columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Wenbin Zhou&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 03:02:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatation-on-new-proportional-interest-rate-change-from/m-p/3803446#M148710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-02T03:02:21Z</dc:date>
    </item>
  </channel>
</rss>

