<?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 help Calculate Prior year values working for one other filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-Calculate-Prior-year-values-working-for-one-other/m-p/4018305#M158470</link>
    <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Source Data&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Previous Year Formula&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Result when nothing is selected&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Result when 2024 is selected. Please check the prior snapshot for the result of 2023 in the matrix table.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Business Development is selected from Department Slicer.&lt;BR /&gt;&lt;BR /&gt;One more thing before doing the measure I had created the year column from the date column.&lt;BR /&gt;&lt;BR /&gt;Please let me know if the same formula is applicable for your dataset or not.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 09:43:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-07-01T09:43:31Z</dc:date>
    <item>
      <title>Need help Calculate Prior year values working for one other filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-Calculate-Prior-year-values-working-for-one-other/m-p/4017525#M158409</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on the data where I am calculating the sum of appointments total by prior fiscal year.&amp;nbsp; to calculate the prior year values , I have used a calculation suggested by this forum, it works fine&amp;nbsp; when we select year filter, but the moment I select other filter this calculation prior year calculation doesnot hold good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I correct it ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the calculation I am using to calculate previous year&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'OLD ONE'&lt;/SPAN&gt;&lt;SPAN&gt;[COUNT(DISTINCT APT)]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;filter&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;'OLD ONE'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;[FISCAL_YEAR_NUM]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'OLD ONE'&lt;/SPAN&gt;&lt;SPAN&gt;[FISCAL_YEAR_NUM]&lt;/SPAN&gt;&lt;SPAN&gt;)-&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Now I want this calcualtion to work for other region level filter too . the moment I chose a region filter the prior year filter is not working&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Jul 2024 02:28:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-Calculate-Prior-year-values-working-for-one-other/m-p/4017525#M158409</guid>
      <dc:creator>MaliniBaktha</dc:creator>
      <dc:date>2024-07-01T02:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help Calculate Prior year values working for one other filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-Calculate-Prior-year-values-working-for-one-other/m-p/4017567#M158413</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I assume your datamodel does not have calendar dimension table or region dimension table.&lt;/P&gt;
&lt;P&gt;One of the best ways is to have those dimension tables, but in case you cannot create those, please try something like below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;expected previous year =
CALCULATE (
    SUM ( 'OLD ONE'[COUNT(DISTINCT APT)] ),
    VALUES ( 'OLD ONE'[Region Name] ),
    FILTER (
        ALL ( 'OLD ONE' ),
        [FISCAL_YEAR_NUM]
            = SELECTEDVALUE ( 'OLD ONE'[FISCAL_YEAR_NUM] ) - 1
    )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 01 Jul 2024 02:49:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-Calculate-Prior-year-values-working-for-one-other/m-p/4017567#M158413</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-07-01T02:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help Calculate Prior year values working for one other filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-Calculate-Prior-year-values-working-for-one-other/m-p/4018305#M158470</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Source Data&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Previous Year Formula&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Result when nothing is selected&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Result when 2024 is selected. Please check the prior snapshot for the result of 2023 in the matrix table.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Business Development is selected from Department Slicer.&lt;BR /&gt;&lt;BR /&gt;One more thing before doing the measure I had created the year column from the date column.&lt;BR /&gt;&lt;BR /&gt;Please let me know if the same formula is applicable for your dataset or not.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 09:43:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-Calculate-Prior-year-values-working-for-one-other/m-p/4018305#M158470</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-01T09:43:31Z</dc:date>
    </item>
  </channel>
</rss>

