<?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: Dynamic DateDiff - Aging of DaysToPay in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DateDiff-Aging-of-DaysToPay/m-p/777541#M4002</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="165858" data-lia-user-login="pt008" class="lia-mention lia-mention-user"&gt;pt008&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please read this&amp;nbsp;&lt;SPAN&gt;article&amp;nbsp;if you want your question answered.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_self"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;IMG src="https://ip1.i.lithium.com/1232d707bb27fc4afa3b81cd0702c478b6f7aced/68747470733a2f2f7374617469632e6c6963646e2e636f6d2f736364732f636f6d6d6f6e2f752f696d616765732f6c6f676f732f6c696e6b6564696e2f6c6f676f5f6c696e6b6564696e5f39337832315f76322e706e67" border="0" alt="Mariusz Repczynski" /&gt;&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2019 07:27:13 GMT</pubDate>
    <dc:creator>Mariusz</dc:creator>
    <dc:date>2019-08-28T07:27:13Z</dc:date>
    <item>
      <title>Dynamic DateDiff - Aging of DaysToPay</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DateDiff-Aging-of-DaysToPay/m-p/777218#M3993</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a fact table with Sales Invoices&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each transaction has the following fields:&lt;/P&gt;&lt;P&gt;DateOfTrans,&lt;/P&gt;&lt;P&gt;Amount,&lt;/P&gt;&lt;P&gt;Balance: live field - updated as and when payments are applied to it (=0 for payments),&lt;/P&gt;&lt;P&gt;DueDate, and&amp;nbsp;&lt;/P&gt;&lt;P&gt;Last_paid_Date: Refers to the date of the last payment trans applied to a sales invoice =&amp;gt;If Balance = 0 this is the date the sales invoice was completely paid off&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to calculate a snapshot view&amp;nbsp; of average days a customer takes to pay off invoices (and then show aging of said DaystoPay over time) with the following logic:&lt;/P&gt;&lt;P&gt;1. If Balance = 0:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(a) Last_paid_Date &amp;lt; SelectedDate =&amp;gt; DaystoPay =&amp;nbsp; (Last_paid_Date - DateOfTrans)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(b)&amp;nbsp;Last_paid_Date &amp;lt; SelectedDate =&amp;gt; DaystoPay =&amp;nbsp; (SelectedDate - DateOfTrans)&amp;nbsp; (i.e. consider it unpaid as of selected date)&lt;/P&gt;&lt;P&gt;2. If Balance &amp;lt;&amp;gt; 0 =&amp;gt;&amp;nbsp;DaystoPay =&amp;nbsp; (SelectedDate - DateOfTrans)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having troubles calculating this at a row level because DAX will only let me select fields as an aggregate value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pelase help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 21:34:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DateDiff-Aging-of-DaysToPay/m-p/777218#M3993</guid>
      <dc:creator>pt008</dc:creator>
      <dc:date>2019-08-27T21:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic DateDiff - Aging of DaysToPay</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DateDiff-Aging-of-DaysToPay/m-p/777541#M4002</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="165858" data-lia-user-login="pt008" class="lia-mention lia-mention-user"&gt;pt008&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please read this&amp;nbsp;&lt;SPAN&gt;article&amp;nbsp;if you want your question answered.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_self"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;IMG src="https://ip1.i.lithium.com/1232d707bb27fc4afa3b81cd0702c478b6f7aced/68747470733a2f2f7374617469632e6c6963646e2e636f6d2f736364732f636f6d6d6f6e2f752f696d616765732f6c6f676f732f6c696e6b6564696e2f6c6f676f5f6c696e6b6564696e5f39337832315f76322e706e67" border="0" alt="Mariusz Repczynski" /&gt;&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 07:27:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DateDiff-Aging-of-DaysToPay/m-p/777541#M4002</guid>
      <dc:creator>Mariusz</dc:creator>
      <dc:date>2019-08-28T07:27:13Z</dc:date>
    </item>
  </channel>
</rss>

