<?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: Running MAXIMUM of measure result in a period. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3338738#M125272</link>
    <description>&lt;P&gt;Thank you so much, this solution worked with a little tweaking to the metric being MAXX'd - had some minor issues but otherwise good to go!&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jul 2023 13:38:26 GMT</pubDate>
    <dc:creator>JenAbe</dc:creator>
    <dc:date>2023-07-19T13:38:26Z</dc:date>
    <item>
      <title>Running MAXIMUM of measure result in a period.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3335251#M125067</link>
      <description>&lt;P&gt;I have a scenario where I need to determine the MAX value of a calculated measure within a period for a specific entity (ie by date and id).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been able to use DAX to get the MAX value by period by id&lt;U&gt;&lt;STRONG&gt; overall&lt;/STRONG&gt; &lt;/U&gt;BUT as the number fluxtuates during the time period being reported I want this measure to always reflect the maximum up until that point. To illustrate:&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;Note how the max always reflect the maximum value of all values between it and the start date (each id has a start date associated with it in this case April 21&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DAX I came up with which gives me an overall MAX reliably looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR a = CALCULATETABLE(&lt;BR /&gt;&lt;EM&gt;SUMMARIZE(&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Calendar,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Calendar[Month-Year],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"# Items", [# Items Measure]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;), NOT ISBLANK( OtherTable[Id] )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;VAR b = CALCULATE( MAXX( a, [# Items] ),values(OtherTable[Id]) )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;RETURN b&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas? I am able to do this in SQL and in EXCEL. Can probably do it in M - but I really want this to be a calculated measure in DAX if possible. I mean, it should be possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 21:32:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3335251#M125067</guid>
      <dc:creator>JenAbe</dc:creator>
      <dc:date>2023-07-17T21:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Running MAXIMUM of measure result in a period.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3335529#M125085</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&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;&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;LI-CODE lang="markup"&gt;Max of value measure: =
IF (
    HASONEVALUE ( 'ID'[ID] ),
    MAXX (
        WINDOW (
            1,
            ABS,
            0,
            REL,
            SUMMARIZE (
                ALL ( Data ),
                'Calendar'[Month-Year sort],
                'Calendar'[Month-Year],
                'ID'[ID]
            ),
            ORDERBY ( 'Calendar'[Month-Year sort], ASC ),
            ,
            PARTITIONBY ( 'ID'[ID] )
        ),
        CALCULATE ( SUM ( Data[Count of Value] ) )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 03:12:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3335529#M125085</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-07-18T03:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Running MAXIMUM of measure result in a period.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3338738#M125272</link>
      <description>&lt;P&gt;Thank you so much, this solution worked with a little tweaking to the metric being MAXX'd - had some minor issues but otherwise good to go!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 13:38:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3338738#M125272</guid>
      <dc:creator>JenAbe</dc:creator>
      <dc:date>2023-07-19T13:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Running MAXIMUM of measure result in a period.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3339473#M125315</link>
      <description>&lt;P&gt;Hey, the solution you gave me works but I have a small issue. My max measure seems to randomly return blanks for no apparent reason:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF (
HASONEVALUE ( 'Table'[Id] ),
MAXX(
WINDOW(
1,
ABS,
0,
REL,
SUMMARIZE(
ALL( Table ),
Calendar[Sort Month Year],
Calendar[Month Year],
'Table'[Id]
),
ORDERBY( Calendar[Sort Month Year], ASC ),
,
PARTITIONBY( 'Table'[Id] )
),
CALCULATE( [Measure Value Logic])
)
)
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a value returned for the measure being 'maxed' but it doesn't want to display that value in some cases. I thought it may be HAS ONE VALUE -but it does have one value that can't be right...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas ( I realize this is a bit obscure)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 20:42:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3339473#M125315</guid>
      <dc:creator>JenAbe</dc:creator>
      <dc:date>2023-07-19T20:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Running MAXIMUM of measure result in a period.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3339838#M125333</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please share your sample pbix file's link, and then I can try to look into it.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 02:53:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-MAXIMUM-of-measure-result-in-a-period/m-p/3339838#M125333</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-07-20T02:53:38Z</dc:date>
    </item>
  </channel>
</rss>

