<?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 MTD - Calculation not working in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2078250#M155657</link>
    <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Please see the image above, I have attempted to calculate the count for the month to date as you can see. I would expect on the 15/09 as I am perfoming this calculation it should return 145 adding up all the values in red. However for some reason it is only providing 2. Can you advise why.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI: The field types are Whole Number and Date respectivly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Sep 2021 16:29:34 GMT</pubDate>
    <dc:creator>andrewb95</dc:creator>
    <dc:date>2021-09-15T16:29:34Z</dc:date>
    <item>
      <title>MTD - Calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2078250#M155657</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Please see the image above, I have attempted to calculate the count for the month to date as you can see. I would expect on the 15/09 as I am perfoming this calculation it should return 145 adding up all the values in red. However for some reason it is only providing 2. Can you advise why.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI: The field types are Whole Number and Date respectivly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 16:29:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2078250#M155657</guid>
      <dc:creator>andrewb95</dc:creator>
      <dc:date>2021-09-15T16:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: MTD - Calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2078285#M155658</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="127708" data-lia-user-login="andrewb95" class="lia-mention lia-mention-user"&gt;andrewb95&lt;/a&gt; , You should always use date table joined with date of your table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;calculate(sum('Total -Count'[Count]), datesmtd('Date'[Date]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: &lt;A href="https://youtu.be/OBf0rjpp5Hw" target="_blank"&gt;https://youtu.be/OBf0rjpp5Hw&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 16:47:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2078285#M155658</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-09-15T16:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: MTD - Calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2078520#M155659</link>
      <description>&lt;LI-CODE lang="markup"&gt;= 
CALCULATE(
    SUM( 'Total-Count'[Count] ),
    DATESMTD( 'Total-Count'[Date] ),
    REMOVEFILTERS( 'Total-Count'[Date] )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 15 Sep 2021 20:02:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2078520#M155659</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2021-09-15T20:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: MTD - Calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2079689#M155660</link>
      <description>&lt;P&gt;Hi Amit,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When creating a relationship to the date table (which I have updated as indicated above) the value actually changes to null so this is very unusual.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 08:44:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2079689#M155660</guid>
      <dc:creator>andrewb95</dc:creator>
      <dc:date>2021-09-16T08:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: MTD - Calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2085155#M155661</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="127708" data-lia-user-login="andrewb95" class="lia-mention lia-mention-user"&gt;andrewb95&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could not reproduct your problem. Maybe you can try the following measures:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure1 = 
CALCULATE(
    SUM('Total - Count'[Count]),
    ALL('Total - Count'[Date]),
    DATESMTD('Total - Count'[Date])
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure2 = 
CALCULATE (
    SUM ( 'Total - Count'[Count] ),
    FILTER (
        ALL ( 'Total - Count' ),
        'Total - Count'[Date] &amp;lt;= TODAY ()
            &amp;amp;&amp;amp; 'Total - Count'[Date] &amp;lt;= MAX ( 'Total - Count'[Date] )
            &amp;amp;&amp;amp; FORMAT ( 'Total - Count'[Date], "yyyymm" )
                = FORMAT ( MAX ( 'Total - Count'[Date] ), "yyyymm" )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Winniz&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>Mon, 20 Sep 2021 05:19:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2085155#M155661</guid>
      <dc:creator>v-kkf-msft</dc:creator>
      <dc:date>2021-09-20T05:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: MTD - Calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2102520#M155662</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="127708" data-lia-user-login="andrewb95" class="lia-mention lia-mention-user"&gt;andrewb95&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has your problem been solved? If it is solved, please mark a reply which is helpful to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Winniz&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 09:03:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/2102520#M155662</guid>
      <dc:creator>v-kkf-msft</dc:creator>
      <dc:date>2021-09-28T09:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: MTD - Calculation not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/3998800#M155663</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MTD =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;[Count]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&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;ALL&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'table'&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;'table'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&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; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;this formula works for me and if you want to add the specific filter please add after ALL&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MTD =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;[Count]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&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;ALL&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;[Defect Category - 1]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"KK"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;&amp;amp;&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;'table'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'table'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&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; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 18 Jun 2024 18:45:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MTD-Calculation-not-working/m-p/3998800#M155663</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-18T18:45:33Z</dc:date>
    </item>
  </channel>
</rss>

