<?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: How to find the start date and end date of a maximum value? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2562147#M72918</link>
    <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;It's not recognizing the variable in the calculate statement&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2022 21:37:32 GMT</pubDate>
    <dc:creator>saavedrag12</dc:creator>
    <dc:date>2022-06-06T21:37:32Z</dc:date>
    <item>
      <title>How to find the start date and end date of a maximum value?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2561649#M72891</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to figure out a way for Power BI to call out a a start and end date of a maximum value. So for context, I am working with headcount data. Our headcout over a duration of a project looks a lot like a bell curve, however, once the peak headcount is reached, it stays at that amount for a number of weeks before declining again. I want to create a dynamic measure that calls out the individual weeks that the peak starts and ends.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is our formula to get the actual peak headcount amount (sum of headcount divied up by discipline):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure_Peak_HC= SUMX(SUMMARIZE(DisciplineTable, DisciplineTable[discipline], "Max HC", MAX(HeadcountTable[Headcount])), [Max HC])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now we're trying to create a measure that finds the start and end date (work week) of that peak HC.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips or tricks would help!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 15:58:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2561649#M72891</guid>
      <dc:creator>saavedrag12</dc:creator>
      <dc:date>2022-06-06T15:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the start date and end date of a maximum value?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2561664#M72892</link>
      <description>&lt;P&gt;Hi, can you share some sample data?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 16:06:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2561664#M72892</guid>
      <dc:creator>milanpasschier2</dc:creator>
      <dc:date>2022-06-06T16:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the start date and end date of a maximum value?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2561700#M72897</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;For example: I want to create a measure that will call out the start date (and end date) of the peak HC (WW circled in green). So in this case, if I were to put the measure on the card, it will call out the value/date : WW 37.22 (this is from our calendar table)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 16:31:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2561700#M72897</guid>
      <dc:creator>saavedrag12</dc:creator>
      <dc:date>2022-06-06T16:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the start date and end date of a maximum value?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2561927#M72905</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397866" data-lia-user-login="saavedrag12" class="lia-mention lia-mention-user"&gt;saavedrag12&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please try&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Peak Start &amp;amp; End =
VAR MaxCount = [Measure_Peak_HC]
VAR PeakWeeks =
    FILTER ( VALUES ( 'Date'[Column_WW_YR] ), [HeadCount] = PeakWeeks )
VAR MinWeek =
    MINX ( PeakWeeks, 'Date'[Column_WW_YR] )
VAR MaxWeek =
    MAXX ( PeakWeeks, 'Date'[Column_WW_YR] )
RETURN
    "Peak Count of " &amp;amp; MaxCount &amp;amp; " within " &amp;amp; MinWeek &amp;amp; " - " &amp;amp; MaxWeek&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Jun 2022 19:15:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2561927#M72905</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-06T19:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the start date and end date of a maximum value?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2562002#M72910</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't allow me to select the headcount column when creating the second variable :&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;</description>
      <pubDate>Mon, 06 Jun 2022 19:49:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2562002#M72910</guid>
      <dc:creator>saavedrag12</dc:creator>
      <dc:date>2022-06-06T19:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the start date and end date of a maximum value?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2562051#M72912</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397866" data-lia-user-login="saavedrag12" class="lia-mention lia-mention-user"&gt;saavedrag12&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought head count is a measure. So it is just a coulmn summarized by sum?&lt;/P&gt;&lt;P&gt;then please try&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Peak Start &amp;amp; End =
VAR MaxCount = [Measure_Peak_HC]
VAR PeakWeeks =
    FILTER (
        VALUES ( 'Date'[Column_WW_YR] ),
        CALCULATE ( SUM ( TableName[HeadCount] ) ) = PeakWeeks
    )
VAR MinWeek =
    MINX ( PeakWeeks, 'Date'[Column_WW_YR] )
VAR MaxWeek =
    MAXX ( PeakWeeks, 'Date'[Column_WW_YR] )
RETURN
    "Peak Count of " &amp;amp; MaxCount &amp;amp; " within " &amp;amp; MinWeek &amp;amp; " - " &amp;amp; MaxWeek&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 06 Jun 2022 20:14:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2562051#M72912</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-06T20:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the start date and end date of a maximum value?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2562147#M72918</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;It's not recognizing the variable in the calculate statement&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 21:37:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2562147#M72918</guid>
      <dc:creator>saavedrag12</dc:creator>
      <dc:date>2022-06-06T21:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the start date and end date of a maximum value?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2562512#M72936</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397866" data-lia-user-login="saavedrag12" class="lia-mention lia-mention-user"&gt;saavedrag12&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry O wrote the wrong variable name. Here modied&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Peak Start &amp;amp; End =
VAR MaxCount = [Measure_Peak_HC]
VAR PeakWeeks =
    FILTER (
        VALUES ( 'Date'[Column_WW_YR] ),
        CALCULATE ( SUM ( TableName[HeadCount] ) ) = PeakWeeks
    )
VAR MinWeek =
    MINX ( PeakWeeks, 'Date'[Column_WW_YR] )
VAR MaxWeek =
    MAXX ( PeakWeeks, 'Date'[Column_WW_YR] )
RETURN
    "Peak Count of " &amp;amp; MaxCount &amp;amp; " within " &amp;amp; MinWeek &amp;amp; " - " &amp;amp; MaxWeek&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 02:34:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-the-start-date-and-end-date-of-a-maximum-value/m-p/2562512#M72936</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-07T02:34:18Z</dc:date>
    </item>
  </channel>
</rss>

