<?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 Column that will return payments made 2 months earlier in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1210951#M19493</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to improve my column, to eliminate necessity of using statement with actual date: "DATE(2020;04;01)"; because every month I have to change it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Input data will be always downloaded for last 3 months; and this column is to return values for current mont -2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Payments Received in April = IF('All'[Document type]="DZ";IF(AND('All'[Document Date]&amp;gt;=DATE(2020;04;01);'All'[Document Date]&amp;lt;DATE(2020;05;01));'All'[Amount in local currency];BLANK());BLANK())&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jul 2020 07:26:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-07-09T07:26:47Z</dc:date>
    <item>
      <title>Column that will return payments made 2 months earlier</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1210951#M19493</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to improve my column, to eliminate necessity of using statement with actual date: "DATE(2020;04;01)"; because every month I have to change it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Input data will be always downloaded for last 3 months; and this column is to return values for current mont -2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Payments Received in April = IF('All'[Document type]="DZ";IF(AND('All'[Document Date]&amp;gt;=DATE(2020;04;01);'All'[Document Date]&amp;lt;DATE(2020;05;01));'All'[Amount in local currency];BLANK());BLANK())&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 07:26:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1210951#M19493</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-09T07:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Column that will return payments made 2 months earlier</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1211438#M19503</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;You can try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Payments Received in April =
IF (
    'All'[Document type] = "DZ";
    IF (
        AND (
            'All'[Document Date]
                &amp;gt;= TODAY () - 90;
            'All'[Document Date]
                &amp;lt; TODAY () - 60
        );
        'All'[Amount in local currency];
        BLANK ()
    );
    BLANK ()
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 09:34:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1211438#M19503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-09T09:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Column that will return payments made 2 months earlier</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1211463#M19505</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;Thank you for reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Unfortunately, even if updated in the middle of the month, it must return only values from a single month.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B.R.&amp;nbsp;&lt;BR /&gt;M.R.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 09:40:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1211463#M19505</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-09T09:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Column that will return payments made 2 months earlier</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1211498#M19506</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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Payments Received =
VAR a =
    MONTH (
        TODAY ()
    )
VAR b =
    SWITCH (
        TRUE ();
        a = 3; 12;
        a = 2; 11;
        a = 1; 10;
        a
    )
RETURN
    IF (
        'All'[Document type] = "DZ";
        IF (
            AND (
                'All'[Document Date]
                    &amp;gt;= DATE ( 2020; b - 3; 01 );
                'All'[Document Date]
                    &amp;lt; DATE ( 2020; b - 2; 01 )
            );
            'All'[Amount in local currency];
            BLANK ()
        );
        BLANK ()
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 09:49:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1211498#M19506</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-09T09:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Column that will return payments made 2 months earlier</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1211547#M19508</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;Thank you very much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B.R.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;M.R.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 10:03:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1211547#M19508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-09T10:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Column that will return payments made 2 months earlier</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1241044#M20350</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well actually I found this function to work better:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum of payments CM -2 = 
IF (
    'All'[Document type] = "DZ",
    IF (
        'All'[Document Date] &amp;gt; EOMONTH ( TODAY (), -3 )
            &amp;amp;&amp;amp; 'All'[Document Date] &amp;lt;= EOMONTH ( TODAY (), -2 ),
        'All'[Amount in local currency],
        BLANK ()
    ),
    BLANK ()
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B.R.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;M.R.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 09:31:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Column-that-will-return-payments-made-2-months-earlier/m-p/1241044#M20350</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-22T09:31:24Z</dc:date>
    </item>
  </channel>
</rss>

