<?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 Finding the maximum value within a 12 month date range in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-maximum-value-within-a-12-month-date-range/m-p/2593493#M74772</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I need help in creating a new column in my table (MaxValueWithinRange) where the value returned is the maximum value within a 12 month date range from a corresponding date in the row.&lt;/P&gt;&lt;P&gt;For example, if the date (in the "Date" column) is 17/09/2021, the date range I would want to look up the max value from would be 18/09/2020 to 17/09/2021. The max value within this range is 17407.&lt;/P&gt;&lt;P&gt;Please see example below of what I'm trying to achieve. Please note, the "From" and "To" columns are only in this example and not actually in my PBI table.&lt;/P&gt;&lt;P&gt;Many thanks&lt;BR /&gt;darls15&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;</description>
    <pubDate>Wed, 22 Jun 2022 01:44:45 GMT</pubDate>
    <dc:creator>onedayover</dc:creator>
    <dc:date>2022-06-22T01:44:45Z</dc:date>
    <item>
      <title>Finding the maximum value within a 12 month date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-maximum-value-within-a-12-month-date-range/m-p/2593493#M74772</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I need help in creating a new column in my table (MaxValueWithinRange) where the value returned is the maximum value within a 12 month date range from a corresponding date in the row.&lt;/P&gt;&lt;P&gt;For example, if the date (in the "Date" column) is 17/09/2021, the date range I would want to look up the max value from would be 18/09/2020 to 17/09/2021. The max value within this range is 17407.&lt;/P&gt;&lt;P&gt;Please see example below of what I'm trying to achieve. Please note, the "From" and "To" columns are only in this example and not actually in my PBI table.&lt;/P&gt;&lt;P&gt;Many thanks&lt;BR /&gt;darls15&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;</description>
      <pubDate>Wed, 22 Jun 2022 01:44:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-maximum-value-within-a-12-month-date-range/m-p/2593493#M74772</guid>
      <dc:creator>onedayover</dc:creator>
      <dc:date>2022-06-22T01:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum value within a 12 month date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-maximum-value-within-a-12-month-date-range/m-p/2593683#M74784</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I understood your question correctly, but please check the below picture and the attached pibx file.&lt;/P&gt;
&lt;P&gt;It is for creating a new column.&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;LI-CODE lang="markup"&gt;MaxValueWithinRange CC =
VAR _rangeenddate = Data[Date]
VAR _rangestartdate =
    DATE ( YEAR ( _rangeenddate ) - 1, MONTH ( _rangeenddate ), DAY ( _rangeenddate ) ) + 1
VAR _result =
    MAXX (
        FILTER ( Data, Data[Date] &amp;gt;= _rangestartdate &amp;amp;&amp;amp; Data[Date] &amp;lt;= _rangeenddate ),
        Data[TotalUsers]
    )
RETURN
    _result
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Jun 2022 03:29:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-maximum-value-within-a-12-month-date-range/m-p/2593683#M74784</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-06-22T03:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum value within a 12 month date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-maximum-value-within-a-12-month-date-range/m-p/2593696#M74785</link>
      <description>&lt;P&gt;Yes that's exactly it! It works perfectly with my data, thank you so much&amp;nbsp;Jihwan_Kim&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 03:45:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-the-maximum-value-within-a-12-month-date-range/m-p/2593696#M74785</guid>
      <dc:creator>onedayover</dc:creator>
      <dc:date>2022-06-22T03:45:21Z</dc:date>
    </item>
  </channel>
</rss>

