<?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: Dynamic Year End Calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Year-End-Calculation/m-p/4388583#M174222</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="902127" data-lia-user-login="homia1kr" class="lia-mention lia-mention-user"&gt;homia1kr&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Clients Previous YE =
VAR vSelectedYear =
    YEAR ( MAXX ( ALLSELECTED ( 'Date' ), 'Date'[Date] ) )
VAR vResult =
    CALCULATE (
        SUM ( Client_Table[SUM (Clients)] ),
        'Date'[Month End]
            = DATE ( vSelectedYear - 1, 12, 31 )
    )
RETURN
    vResult&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2025 17:02:18 GMT</pubDate>
    <dc:creator>DataInsights</dc:creator>
    <dc:date>2025-01-30T17:02:18Z</dc:date>
    <item>
      <title>Dynamic Year End Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Year-End-Calculation/m-p/4388546#M174220</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I have a date table and a table that has a breakdown of # of clients by month end.&amp;nbsp; I want to be able to pull the sum of the previous year-end number of clients based on the date selected in the slicer.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this formula that works currently, but I'd like to make it dynamic so that I can look at this coming year and last year, rather than having the date hard-coded which means that I can only look at one year in my slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Clients YE 23 = CALCULATE(SUM(Client_Table [SUM (Clients)]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FILTER(&lt;BR /&gt;ALL('Date'[Month end]),&lt;BR /&gt;'Date'[Month end] = DATE(2023,12,31)&lt;BR /&gt;))&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 16:30:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Year-End-Calculation/m-p/4388546#M174220</guid>
      <dc:creator>homia1kr</dc:creator>
      <dc:date>2025-01-30T16:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Year End Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Year-End-Calculation/m-p/4388583#M174222</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="902127" data-lia-user-login="homia1kr" class="lia-mention lia-mention-user"&gt;homia1kr&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Clients Previous YE =
VAR vSelectedYear =
    YEAR ( MAXX ( ALLSELECTED ( 'Date' ), 'Date'[Date] ) )
VAR vResult =
    CALCULATE (
        SUM ( Client_Table[SUM (Clients)] ),
        'Date'[Month End]
            = DATE ( vSelectedYear - 1, 12, 31 )
    )
RETURN
    vResult&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 17:02:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Year-End-Calculation/m-p/4388583#M174222</guid>
      <dc:creator>DataInsights</dc:creator>
      <dc:date>2025-01-30T17:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Year End Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Year-End-Calculation/m-p/4388634#M174223</link>
      <description>&lt;P&gt;Thank you SO much! I've been trying everything for the last 2 days. Works perfectly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 17:42:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Year-End-Calculation/m-p/4388634#M174223</guid>
      <dc:creator>homia1kr</dc:creator>
      <dc:date>2025-01-30T17:42:09Z</dc:date>
    </item>
  </channel>
</rss>

