<?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: Min &amp;amp; Max Value per Month on a Running Total - Performance issue in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329422#M124730</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;I suggest to analyze it in "isolated scenario" meaning that you remove any other visuals in canvas / report and check timing, this way you figure out how other visuals affect your specific one. In addition, use DAX Studio to trace performance and accordingly eventually adjust code.&lt;/P&gt;&lt;P&gt;Another, complex maybe approach would be to "move" amounts to Calendar / Date Table if it suits your need. This way as probably your Date / Calendar table is much much lowe concerning cardinality than your Fact table. Think about it.&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope this help&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2023 12:58:55 GMT</pubDate>
    <dc:creator>some_bih</dc:creator>
    <dc:date>2023-07-13T12:58:55Z</dc:date>
    <item>
      <title>Min &amp; Max Value per Month on a Running Total - Performance issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329024#M124697</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a cash flow report I need to show the dailly postition of the cash accounts; it's basically a runing total of all transactions.&lt;/P&gt;&lt;P&gt;No particular problem with that, I use this mesaure to calculate the running total :&lt;BR /&gt;&lt;BR /&gt;running total =&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;( &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;GL_ENTRY&lt;/SPAN&gt;&lt;SPAN&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CALENDAR&lt;/SPAN&gt;&lt;SPAN&gt;[DAY]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(CALENDAR&lt;/SPAN&gt;&lt;SPAN&gt;[DAY]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(CALENDAR&lt;/SPAN&gt;&lt;SPAN&gt;[DAY]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&lt;BR /&gt;Then I need to show the min and the max value of the month for this running total. I create 2 other measures this way :&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Min monthly position&amp;nbsp; = &lt;/SPAN&gt;&lt;SPAN&gt;MINX&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;CALENDAR&lt;/SPAN&gt;&lt;SPAN&gt;[DAY]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[running total]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt; ( CALENDAR&lt;/SPAN&gt;&lt;SPAN&gt;[YEAR_MONTH]&lt;/SPAN&gt;&lt;SPAN&gt; ) ) )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;Same for Max position.&lt;BR /&gt;&lt;BR /&gt;Basically it works I have the expected result :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BUT&lt;/STRONG&gt; I have a severe performance issue. The Min and max value only appear after few minutes and when filters limit the number of transactions. Otherwise I got an error message.&lt;BR /&gt;&lt;BR /&gt;There are 18 Million records in my fact table GL_ENTRY.&lt;BR /&gt;Is there a more efficient way to show the Min and the Max monthly value ?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 09:39:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329024#M124697</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-13T09:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Min &amp; Max Value per Month on a Running Total - Performance issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329093#M124705</link>
      <description>&lt;P&gt;HI&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;try with variable for max date&lt;/P&gt;&lt;P&gt;running total =&lt;BR /&gt;VAR _max_date=MAX(CALENDAR[DAY])&lt;/P&gt;&lt;P&gt;CALCULATE( Sum(GL_ENTRY[Amount]),&lt;/P&gt;&lt;P&gt;CALENDAR[DAY] &amp;lt;= _max_date,&lt;BR /&gt;ALL(CALENDAR[DAY])&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Did I answer your question? Mark my post as a solution! Kudos Appreciated!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 09:46:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329093#M124705</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-07-13T09:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Min &amp; Max Value per Month on a Running Total - Performance issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329153#M124709</link>
      <description>&lt;P&gt;Much better indeed !&amp;nbsp;I don't have error message anymore.&lt;BR /&gt;But the line chart is still a bit long to show up (arround 50 sec).&lt;BR /&gt;&lt;BR /&gt;Any advice to tune the Min and Max measures ?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 10:17:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329153#M124709</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-13T10:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Min &amp; Max Value per Month on a Running Total - Performance issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329245#M124717</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;again try with variable&lt;/P&gt;&lt;DIV&gt;Min monthly position&amp;nbsp; =&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;VAR _selected_period = VALUES(CALENDAR[YEAR_MONTH])&lt;/DIV&gt;&lt;DIV&gt;VAR _result=&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MINX (ALL(CALENDAR[DAY]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[running total]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_selected_period&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;RETURN _result&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Jul 2023 11:19:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329245#M124717</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-07-13T11:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Min &amp; Max Value per Month on a Running Total - Performance issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329366#M124722</link>
      <description>&lt;P&gt;Unfortunately it doesn't make a significant difference to use a variable in the min monthly position &lt;span class="lia-unicode-emoji" title=":slightly_frowning_face:"&gt;🙁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 12:26:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329366#M124722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-13T12:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Min &amp; Max Value per Month on a Running Total - Performance issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329422#M124730</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;I suggest to analyze it in "isolated scenario" meaning that you remove any other visuals in canvas / report and check timing, this way you figure out how other visuals affect your specific one. In addition, use DAX Studio to trace performance and accordingly eventually adjust code.&lt;/P&gt;&lt;P&gt;Another, complex maybe approach would be to "move" amounts to Calendar / Date Table if it suits your need. This way as probably your Date / Calendar table is much much lowe concerning cardinality than your Fact table. Think about it.&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope this help&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 12:58:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3329422#M124730</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-07-13T12:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Min &amp; Max Value per Month on a Running Total - Performance issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3337898#M125203</link>
      <description>&lt;P&gt;I'm thinking of a the combination of a Minx with Summarize function by DAY / COMPANY / ACCOUNT / Running Total&lt;BR /&gt;Can it works?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 07:08:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3337898#M125203</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-19T07:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Min &amp; Max Value per Month on a Running Total - Performance issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3338026#M125206</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;summarize is always good option, just try it intcomporate into variable as table and after that iterate this temporary table to get result (I guess measure)&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 08:00:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3338026#M125206</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-07-19T08:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Min &amp; Max Value per Month on a Running Total - Performance issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3338718#M125269</link>
      <description>&lt;P&gt;I think I'm not far from the solution. My summarize table is only 37 K lines vs the 18 M lines of the fact table.&lt;BR /&gt;&lt;BR /&gt;But I have trouble to combine the Minx with the Summarize function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code works but not If I want to show the Min monthly value on a chart with a daily scale&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;Min Runin amount per Month =&lt;BR /&gt;Var TableVar =&lt;BR /&gt;SUMMARIZE(FILTER(GL_ENTRY, LEFT(GL_ENTRY[ACCOUNT],3)="512"),&lt;BR /&gt;GL_ENTRY[ACCOUNT],&lt;BR /&gt;GL_ENTRY[COMPANY],&lt;BR /&gt;GL_ENTRY[MONTH_YYYYMM],&lt;BR /&gt;GL_ENTRY[POSTING_DATE],&lt;BR /&gt;"AMTBANK", Sum(GL_ENTRY[AMOUNT]),&lt;BR /&gt;"RUNBANK", CALCULATE( Sum(GL_ENTRY[AMOUNT]),&lt;BR /&gt;ALLEXCEPT(GL_ENTRY, GL_ENTRY[COMPANY],GL_ENTRY[ACCOUNT]),&lt;BR /&gt;GL_ENTRY[POSTING_DATE] &amp;lt;= EARLIER(GL_ENTRY[POSTING_DATE])&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;MINX(TableVar, [RUNBANQUE])&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;OK&lt;BR /&gt;&lt;img /&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;KO&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 19 Jul 2023 13:32:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-amp-Max-Value-per-Month-on-a-Running-Total-Performance-issue/m-p/3338718#M125269</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-19T13:32:04Z</dc:date>
    </item>
  </channel>
</rss>

