<?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: Dax Measure to show CurrentYear vs PreviousYear in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3424081#M129676</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="466178" data-lia-user-login="kmax" class="lia-mention lia-mention-user"&gt;kmax&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;What about simply like below?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2023 11:21:24 GMT</pubDate>
    <dc:creator>DataNinja777</dc:creator>
    <dc:date>2023-09-11T11:21:24Z</dc:date>
    <item>
      <title>Dax Measure to show CurrentYear vs PreviousYear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3423995#M129670</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I have a slicer with years (2020,2021,2022,2023)&lt;BR /&gt;I have a measure that shows average resolution time as below.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Avg Resolution &lt;/SPAN&gt;&lt;SPAN&gt;Time&lt;/SPAN&gt;&lt;SPAN&gt; (Year) =&lt;/SPAN&gt; &lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Issues&lt;/SPAN&gt;&lt;SPAN&gt;[Resolution Time (Days)]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;I am creating a new year that shows the same data for the previous year with reference to current selected year.&lt;BR /&gt;But it is not working. In the visual it shows one single line. The first measure showing data correctly for alll the months of the selected year. But previous working measure is not working.&lt;BR /&gt;I have tried the following.&lt;BR /&gt;Avg Resolution Time (Previous Year by Month) =&lt;BR /&gt;VAR SelectedYear = MAX(Issues[Created].[Year])&lt;BR /&gt;VAR PreviousYear = SelectedYear - 1&lt;BR /&gt;RETURN&lt;BR /&gt;AVERAGEX(&lt;BR /&gt;FILTER(ALL(Issues), YEAR(Issues[Created]) = PreviousYear),&lt;BR /&gt;Issues[Resolution Time (Days)]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Avg Resolution Time (Previous Year) =&lt;BR /&gt;VAR SelectedYear = MAX(Issues[Created].[Year])&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE(&lt;BR /&gt;AVERAGE(Issues[Resolution Time (Days)]),&lt;BR /&gt;FILTER(ALL(Issues), YEAR(Issues[Created]) = SelectedYear - 1)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 11 Sep 2023 09:29:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3423995#M129670</guid>
      <dc:creator>kmax</dc:creator>
      <dc:date>2023-09-11T09:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Measure to show CurrentYear vs PreviousYear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3424081#M129676</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="466178" data-lia-user-login="kmax" class="lia-mention lia-mention-user"&gt;kmax&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;What about simply like below?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 11:21:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3424081#M129676</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2023-09-11T11:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Measure to show CurrentYear vs PreviousYear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3424126#M129677</link>
      <description>&lt;P&gt;It shows an error "Parameter is not the correct type"&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 10:52:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3424126#M129677</guid>
      <dc:creator>kmax</dc:creator>
      <dc:date>2023-09-11T10:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Measure to show CurrentYear vs PreviousYear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3424166#M129678</link>
      <description>&lt;P&gt;Sorry about it.&amp;nbsp; I fixed the syntax error.&amp;nbsp; Please let me know if it works now.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 11:22:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3424166#M129678</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2023-09-11T11:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Measure to show CurrentYear vs PreviousYear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3430657#M130056</link>
      <description>&lt;P&gt;Sorry for late reply. I am still getting an error when using the measure and Date column in to bar chart.&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 10:09:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3430657#M130056</guid>
      <dc:creator>kmax</dc:creator>
      <dc:date>2023-09-14T10:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Measure to show CurrentYear vs PreviousYear</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3430745#M130066</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="466178" data-lia-user-login="kmax" class="lia-mention lia-mention-user"&gt;kmax&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How was your Calendar table created?&amp;nbsp; Did you use the dax function "calendar" to create it?&amp;nbsp; The error message says that your date table contains duplicates, which should not be the case if you could establish a relationship with your fact table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 10:45:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Measure-to-show-CurrentYear-vs-PreviousYear/m-p/3430745#M130066</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2023-09-14T10:45:41Z</dc:date>
    </item>
  </channel>
</rss>

