<?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 from current month &amp;amp; year, to the same month from the previous year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2212117#M52225</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="341975" data-lia-user-login="Lyle" class="lia-mention lia-mention-user"&gt;Lyle&lt;/a&gt;&amp;nbsp; you can achieve what you need with this, pbix is attached&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _00 =
    MAX ( 'Table'[Count] )
VAR _0 =
    CALCULATE (
        CALCULATE ( MAX ( 'Table'[Count] ), 'Table'[Count] &amp;lt; _00 ),
        ALLEXCEPT ( 'Table', 'Table'[Trade1], 'Table'[Trade2] )
    )
VAR _1 =
    DIVIDE ( MAX ( 'Table'[Count] ) - _0, _0 )
RETURN
    _1
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Nov 2021 14:10:31 GMT</pubDate>
    <dc:creator>smpa01</dc:creator>
    <dc:date>2021-11-29T14:10:31Z</dc:date>
    <item>
      <title>Measure from current month &amp; year, to the same month from the previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2212055#M52220</link>
      <description>&lt;P&gt;I'm trying to create a DAX measure for the growth percentage like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data for 3 years but when using filters in PBI for Trade 1 and Trade 2 I can't figure out the formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 13:30:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2212055#M52220</guid>
      <dc:creator>Lyle</dc:creator>
      <dc:date>2021-11-29T13:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Measure from current month &amp; year, to the same month from the previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2212117#M52225</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="341975" data-lia-user-login="Lyle" class="lia-mention lia-mention-user"&gt;Lyle&lt;/a&gt;&amp;nbsp; you can achieve what you need with this, pbix is attached&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _00 =
    MAX ( 'Table'[Count] )
VAR _0 =
    CALCULATE (
        CALCULATE ( MAX ( 'Table'[Count] ), 'Table'[Count] &amp;lt; _00 ),
        ALLEXCEPT ( 'Table', 'Table'[Trade1], 'Table'[Trade2] )
    )
VAR _1 =
    DIVIDE ( MAX ( 'Table'[Count] ) - _0, _0 )
RETURN
    _1
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 14:10:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2212117#M52225</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-11-29T14:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Measure from current month &amp; year, to the same month from the previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2212351#M52235</link>
      <description>&lt;P&gt;This works for the given example but has a hidden assumption built in that Count is increasing every year. I think you meant to use your index column instead of Count for purposes of sorting (typically, you'd use a date dimension table for this).&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 16:28:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2212351#M52235</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-11-29T16:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Measure from current month &amp; year, to the same month from the previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2212359#M52236</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp; you are right. In that context, OP needs to add an index column and use the following instead&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _00 =
    MAX ( 'Table'[Index] )
VAR _0 =
    CALCULATE (
        CALCULATE ( MAX ( 'Table'[Count] ), 'Table'[Index] &amp;lt; _00 ),
        ALLEXCEPT ( 'Table', 'Table'[Trade1], 'Table'[Trade2] )
    )
VAR _1 =
    DIVIDE ( MAX ( 'Table'[Count] ) - _0, _0 )
RETURN
    _1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 16:34:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2212359#M52236</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-11-29T16:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Measure from current month &amp; year, to the same month from the previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2215583#M52431</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp; I tried this, please see my sample documents.&lt;/P&gt;&lt;P&gt;2019 shouldn't have a % as there's no data for 2018 and the 2020 &amp;amp; 2021 % are not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://contraconsolidations-my.sharepoint.com/:u:/g/personal/dylan_contracon_net/ERldVVcUILdJmn17lrSmtr4BQn-2hnn0dc6D8nEIT0b0zQ?e=tx35T6" target="_blank" rel="noopener"&gt;https://contraconsolidations-my.sharepoint.com/:u:/g/personal/dylan_contracon_net/ERldVVcUILdJmn17lrSmtr4BQn-2hnn0dc6D8nEIT0b0zQ?e=tx35T6&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://contraconsolidations-my.sharepoint.com/:x:/g/personal/dylan_contracon_net/EWaLX3HYNVNOiVLzEb5kt30B02VCQn2bdsb7iuAAN-g07A?e=BO0zdE" target="_blank" rel="noopener"&gt;https://contraconsolidations-my.sharepoint.com/:x:/g/personal/dylan_contracon_net/EWaLX3HYNVNOiVLzEb5kt30B02VCQn2bdsb7iuAAN-g07A?e=BO0zdE&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 07:38:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2215583#M52431</guid>
      <dc:creator>Lyle</dc:creator>
      <dc:date>2021-12-01T07:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Measure from current month &amp; year, to the same month from the previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2216568#M52488</link>
      <description>&lt;P&gt;I think this might be closer to what you're after:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Growth = 
VAR CurrSum = SUM ( Box[Trips] )
VAR PrevSum =
    CALCULATE (
        SUM ( Box[Trips] ),
        DATEADD ( 'Calendar'[Date], -1, YEAR )
    )
RETURN
    IF (
        CurrSum &amp;gt; 0 &amp;amp;&amp;amp; PrevSum &amp;gt; 0,
        DIVIDE ( CurrSum - PrevSum, PrevSum )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Dec 2021 17:22:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2216568#M52488</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-12-01T17:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Measure from current month &amp; year, to the same month from the previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2217379#M52517</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="341975" data-lia-user-login="Lyle" class="lia-mention lia-mention-user"&gt;Lyle&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I think you don't need to add an index column to calculate the growth rate. You can try my measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Growth =
VAR _Current =
    SUM ( Box[Trips] )
VAR _LASTYEAR =
    CALCULATE (
        SUM ( Box[Trips] ),
        FILTER (
            ALL ( 'Calendar' ),
            'Calendar'[Year]
                = MAX ( 'Calendar'[Year] ) - 1
                &amp;amp;&amp;amp; 'Calendar'[Month] = MAX ( 'Calendar'[Month] )
        )
    )
VAR _DIFF = _Current - _LASTYEAR
VAR _GROWTH =
    DIVIDE ( _DIFF, _LASTYEAR )
VAR _MINDATE =
    EOMONTH ( MINX ( ALL ( Box ), Box[ETA] ), 11 )
VAR _MAXDATE =
    EOMONTH ( MAXX ( ALL ( Box ), Box[ETA] ), 0 )
RETURN
    IF (
        MAX ( 'Calendar'[Date] ) &amp;lt;= _MINDATE
            || MAX ( 'Calendar'[Date] ) &amp;gt; _MAXDATE,
        BLANK (),
        _GROWTH
    )
&lt;/LI-CODE&gt;
&lt;P&gt;Here I use mindate (2019/12/31 the last day of first year) and maxdate(2021/11/30 the last day of current month) as a filter in IF function, we will get growth in dates between the range, out the range will show blank.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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>Thu, 02 Dec 2021 05:41:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2217379#M52517</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-02T05:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Measure from current month &amp; year, to the same month from the previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2222747#M52814</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;! Absolutley spot on. Wow this is amazing. Thank you so much.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 09:06:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-from-current-month-amp-year-to-the-same-month-from-the/m-p/2222747#M52814</guid>
      <dc:creator>Lyle</dc:creator>
      <dc:date>2021-12-07T09:06:50Z</dc:date>
    </item>
  </channel>
</rss>

