<?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: Need Urgent help with Cumulative 7 Years Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4589834#M175805</link>
    <description>&lt;P&gt;Hi Srinivas,&lt;BR /&gt;I was using TODAY() as end date becuase I do not have any information on your semantic model. I usually do not use TODAY(), but take the last date we actually have data for, that is usually at least one day earlier. So that could be something like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR LastDate = CALCULATE(MAX(FACT_TABLE[TRANSACTION_DATE]),ALL())&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;So basically take the max date from the main fact table that has an active relationship with the date dimension.&lt;BR /&gt;Now replace TODAY() with LastDate.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2025 10:48:54 GMT</pubDate>
    <dc:creator>sjoerdvn</dc:creator>
    <dc:date>2025-02-28T10:48:54Z</dc:date>
    <item>
      <title>Need Urgent help with Cumulative 7 Years Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4587704#M175746</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The above measure is working fine for prior years, but for the current year, it is incorrectly comparing the full year to -6 years. Instead, it should calculate exactly 7 years back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, since we are in February 2025, the calculation should consider data from February 2018 to February 2025. However, it is currently calculating only from 2019 to 2025, which is incorrect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help adjust the measure to ensure it correctly considers a full 7-year range?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to confirm we use 4-4-5 calendar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Cumulative Units Last 7 Years =&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;CALCULATE(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; [Units],&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; FILTER(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALL(DIM_TIME),&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DIM_TIME[FIN_YEAR] &amp;gt;= MAX(DIM_TIME[FIN_YEAR]) - 6 &amp;amp;&amp;amp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DIM_TIME[FIN_YEAR] &amp;lt;= MAX(DIM_TIME[FIN_YEAR])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; )&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&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;Thanks&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 10:26:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4587704#M175746</guid>
      <dc:creator>Srinivas904</dc:creator>
      <dc:date>2025-02-27T10:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need Urgent help with Cumulative 7 Years Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4587728#M175747</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="643535" data-lia-user-login="Srinivas904" class="lia-mention lia-mention-user"&gt;Srinivas904&lt;/a&gt;&amp;nbsp;Try using&lt;/P&gt;
&lt;P&gt;DAX&lt;BR /&gt;Cumulative Units Last 7 Years =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Units],&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL(DIM_TIME),&lt;BR /&gt;DIM_TIME[DATE] &amp;gt;= DATEADD(MAX(DIM_TIME[DATE]), -7, YEAR) &amp;amp;&amp;amp;&lt;BR /&gt;DIM_TIME[DATE] &amp;lt;= MAX(DIM_TIME[DATE])&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 10:30:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4587728#M175747</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-02-27T10:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need Urgent help with Cumulative 7 Years Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4587741#M175749</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;&amp;nbsp;, Thanks for replying back, I tried ussing it, bu t i got this error&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Parameter is not the corect type&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;can you please assit with this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 10:42:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4587741#M175749</guid>
      <dc:creator>Srinivas904</dc:creator>
      <dc:date>2025-02-27T10:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need Urgent help with Cumulative 7 Years Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4588173#M175761</link>
      <description>&lt;P&gt;try this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR ToDate = IF(TODAY()&amp;lt;MAX(Dim_TIME[FullDate]),TODAY(),MAX(Dim_TIME[FullDate]))
VAR FromDate = EDATE(ToDate, -84)
RETURN
CALCULATE([Units],ALL(Dim_TIME),Dim_TIME[FullDate] &amp;lt;= ToDate, Dim_TIME[FullDate] &amp;gt; FromDate)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Feb 2025 14:32:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4588173#M175761</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2025-02-27T14:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need Urgent help with Cumulative 7 Years Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4588386#M175774</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226664" data-lia-user-login="sjoerdvn" class="lia-mention lia-mention-user"&gt;sjoerdvn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you! The calculation is pretty close, and the prior years are unaffected. However, the current year's value is incorrect.&lt;/P&gt;&lt;P&gt;It should consider the period from February 2025 to February 2018, covering exactly 7 years. The expected value is 42,561, but I am seeing 42,142, which is slightly lower.&lt;/P&gt;&lt;P&gt;Could this discrepancy be due to the use of the 4-4-5 calendar? Are there any adjustments needed in the DAX calculation to ensure accuracy?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 16:28:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4588386#M175774</guid>
      <dc:creator>Srinivas904</dc:creator>
      <dc:date>2025-02-27T16:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need Urgent help with Cumulative 7 Years Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4589834#M175805</link>
      <description>&lt;P&gt;Hi Srinivas,&lt;BR /&gt;I was using TODAY() as end date becuase I do not have any information on your semantic model. I usually do not use TODAY(), but take the last date we actually have data for, that is usually at least one day earlier. So that could be something like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR LastDate = CALCULATE(MAX(FACT_TABLE[TRANSACTION_DATE]),ALL())&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;So basically take the max date from the main fact table that has an active relationship with the date dimension.&lt;BR /&gt;Now replace TODAY() with LastDate.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 10:48:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Urgent-help-with-Cumulative-7-Years-Measure/m-p/4589834#M175805</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2025-02-28T10:48:54Z</dc:date>
    </item>
  </channel>
</rss>

