<?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 previousmonth in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/dax-previousmonth/m-p/187160#M5968</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. The currentvalue that I am using is a measure. Would you have a alternate suggestion?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jun 2017 16:23:04 GMT</pubDate>
    <dc:creator>Janaki</dc:creator>
    <dc:date>2017-06-02T16:23:04Z</dc:date>
    <item>
      <title>dax previousmonth</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dax-previousmonth/m-p/186521#M5937</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying use PREVIOUSMONTH to get the previous month value. My data looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Data looks like this" style="width: 339px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/43941iE102BFEE65B6C437/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I calculated previous from current value using PREVIOUSMONTH, but i get one extra month March 2017.&lt;/P&gt;&lt;P&gt;Previousvalue =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;'xyz'[CurrentValue],&lt;BR /&gt;PREVIOUSMONTH('xyz'[ReportDate].[Date]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me understand why am i getting March, though my date column stops at feb 2017? &amp;nbsp;Thank you,&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 23:26:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dax-previousmonth/m-p/186521#M5937</guid>
      <dc:creator>Janaki</dc:creator>
      <dc:date>2017-06-01T23:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: dax previousmonth</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dax-previousmonth/m-p/186591#M5938</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31978"&gt;@Janaki&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying use PREVIOUSMONTH to get the previous month value. My data looks like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Data looks like this" style="width: 339px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/43941iE102BFEE65B6C437/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I calculated previous from current value using PREVIOUSMONTH, but i get one extra month March 2017.&lt;/P&gt;
&lt;P&gt;Previousvalue =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;'xyz'[CurrentValue],&lt;BR /&gt;PREVIOUSMONTH('xyz'[ReportDate].[Date]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone help me understand why am i getting March, though my date column stops at feb 2017? &amp;nbsp;Thank you,&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31978"&gt;@Janaki&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;It seems by design. If you don't like it, try to apply some tricks as&lt;/P&gt;
&lt;PRE&gt;Previousvalue =
IF (
    ISBLANK ( MAX ( xyz[ReportDate] ) ),
    BLANK (),
    CALCULATE (
        SUM ( 'xyz'[CurrentValue] ),
        PREVIOUSMONTH ( dimdate[Date].[Date] )
    )
)&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Jun 2017 02:29:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dax-previousmonth/m-p/186591#M5938</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-06-02T02:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: dax previousmonth</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dax-previousmonth/m-p/187160#M5968</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. The currentvalue that I am using is a measure. Would you have a alternate suggestion?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 16:23:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dax-previousmonth/m-p/187160#M5968</guid>
      <dc:creator>Janaki</dc:creator>
      <dc:date>2017-06-02T16:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: dax previousmonth</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dax-previousmonth/m-p/187357#M5970</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31978"&gt;@Janaki&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you. The currentvalue that I am using is a measure. Would you have a alternate suggestion?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31978"&gt;@Janaki&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Then just try&lt;/P&gt;
&lt;PRE&gt;Previousvalue =
IF (
    ISBLANK ( MAX ( xyz[ReportDate] ) ),
    BLANK (),
    CALCULATE (
         'xyz'[CurrentValue],
        PREVIOUSMONTH ( dimdate[Date].[Date] )
    )
)&lt;/PRE&gt;</description>
      <pubDate>Sat, 03 Jun 2017 01:18:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dax-previousmonth/m-p/187357#M5970</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-06-03T01:18:00Z</dc:date>
    </item>
  </channel>
</rss>

