<?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: MEASURE for calculating DueDate of invoice (two tables) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MEASURE-for-calculating-DueDate-of-invoice-two-tables/m-p/1371139#M24985</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;Thank you for your reply. I have tried your suggestions (as depicted below) but somehow I'm still not enforcing row context. Also what I am a bit confused about, is that this is a date calculation. So using SUMX ... wouldn't that always return a number?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;nbsp;The first thing try to push this calculation into a sumx or AverageX&lt;BR /&gt;&lt;/FONT&gt;&lt;/EM&gt;Nope, this doesn't work for me. Below I first try to ensure I get the correct value for payment Terms. Some invoices should say 30, some 60... but none 570. Obviously adding things up.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;nbsp;another option is to have min for min date and minx(Debtorpayable, related(customerpayable[payterm]))&lt;BR /&gt;&lt;/FONT&gt;&lt;/EM&gt;Nope, this doesn't work for me either. The payment term which gets returned is then "30" for all invoices.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/FONT&gt; I would like to know how to write the DAX formula for calculating due date. I obviously need row context as pointed out by Amit. Could someone please help me? And also, if it it is not too much to ask, explain the formula and how it works. I really need to get my head wrapped around this DAX. I think I may be missing an entire paradigm... or two or three!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Michelle&lt;/P&gt;</description>
    <pubDate>Tue, 15 Sep 2020 08:20:21 GMT</pubDate>
    <dc:creator>michellepace</dc:creator>
    <dc:date>2020-09-15T08:20:21Z</dc:date>
    <item>
      <title>MEASURE for calculating DueDate of invoice (two tables)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MEASURE-for-calculating-DueDate-of-invoice-two-tables/m-p/1370680#M24971</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Below is what my data model looks like. I would like to write a &lt;STRONG&gt;measure&lt;/STRONG&gt; to calculated DueDate. If this is not possible, I'd appreciated if somebody can explain to me why? From help on other forums, I have been able to create a calculated column to create DueDate. I have also been shown how to do a table merge in Power Query (to get PaymentTerms) and then create a calculated column there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to write a &lt;STRONG&gt;measure&lt;/STRONG&gt; for DueDate (and if not, why not)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 08:23:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MEASURE-for-calculating-DueDate-of-invoice-two-tables/m-p/1370680#M24971</guid>
      <dc:creator>michellepace</dc:creator>
      <dc:date>2020-09-15T08:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: MEASURE for calculating DueDate of invoice (two tables)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MEASURE-for-calculating-DueDate-of-invoice-two-tables/m-p/1370705#M24972</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="133502" data-lia-user-login="michellepace" class="lia-mention lia-mention-user"&gt;michellepace&lt;/a&gt; , it should possible. Will work with row context&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first thing try to push this calculation into a sumx or AverageX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sumx(Debtorpayable,&amp;lt;Formula&amp;gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;another option is to have min for min date and minx(Debtorpayable, related(customerpayable[payterm])) in the same formula&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 04:33:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MEASURE-for-calculating-DueDate-of-invoice-two-tables/m-p/1370705#M24972</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-09-15T04:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: MEASURE for calculating DueDate of invoice (two tables)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MEASURE-for-calculating-DueDate-of-invoice-two-tables/m-p/1371139#M24985</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;Thank you for your reply. I have tried your suggestions (as depicted below) but somehow I'm still not enforcing row context. Also what I am a bit confused about, is that this is a date calculation. So using SUMX ... wouldn't that always return a number?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;nbsp;The first thing try to push this calculation into a sumx or AverageX&lt;BR /&gt;&lt;/FONT&gt;&lt;/EM&gt;Nope, this doesn't work for me. Below I first try to ensure I get the correct value for payment Terms. Some invoices should say 30, some 60... but none 570. Obviously adding things up.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;nbsp;another option is to have min for min date and minx(Debtorpayable, related(customerpayable[payterm]))&lt;BR /&gt;&lt;/FONT&gt;&lt;/EM&gt;Nope, this doesn't work for me either. The payment term which gets returned is then "30" for all invoices.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/FONT&gt; I would like to know how to write the DAX formula for calculating due date. I obviously need row context as pointed out by Amit. Could someone please help me? And also, if it it is not too much to ask, explain the formula and how it works. I really need to get my head wrapped around this DAX. I think I may be missing an entire paradigm... or two or three!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Michelle&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 08:20:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MEASURE-for-calculating-DueDate-of-invoice-two-tables/m-p/1371139#M24985</guid>
      <dc:creator>michellepace</dc:creator>
      <dc:date>2020-09-15T08:20:21Z</dc:date>
    </item>
  </channel>
</rss>

