<?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: SAMEPERIODLASTYEAR not working with filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working-with-filters/m-p/1945232#M42344</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your useful tip. Now i created a datetable, and it's more or less working, the only thing is, that when i now filter via Jahr (from the "basistable") then&amp;nbsp;which is dependent on the scenario (Ist = 2010 - 2020, Reference scenario = 2020-2029) I still get the 2021 in the table in which I have the year from the date_tbl. can this still be excluded somehow? If I take the year Basistbelle (tabelle 1), the Measures are no longer correct&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, best Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jul 2021 09:16:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-08T09:16:03Z</dc:date>
    <item>
      <title>SAMEPERIODLASTYEAR not working with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working-with-filters/m-p/1944539#M42331</link>
      <description>&lt;P&gt;I created a measure to have de Sum of Last Year:&lt;/P&gt;&lt;P&gt;Vorjahr = CALCULATE(SUM(Tabelle1[Anzahl]),SAMEPERIODLASTYEAR(Tabelle1[Date]))&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i have the following table, everything is working:&lt;/P&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;But if I add a dimension to the table, which i filter, then the numbers in the column Vorjahr aren't corret:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without the dimension in the table, just filtering it, the numbers are correct:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can somebody help me with this? How can i add dimensions in the table and filter them so that the numbers are still correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Greeting Karen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 05:39:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working-with-filters/m-p/1944539#M42331</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-08T05:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAMEPERIODLASTYEAR not working with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working-with-filters/m-p/1944899#M42337</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Make sure you use date table for that. Also you date in table should not have timestamp &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Vorjahr = CALCULATE(SUM(Tabelle1[Anzahl]),SAMEPERIODLASTYEAR(Date[Date]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Vorjahr = CALCULATE(SUM(Tabelle1[Anzahl]),dateadd(Date[Date],-1,year))&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;
&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;</description>
      <pubDate>Thu, 08 Jul 2021 07:40:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working-with-filters/m-p/1944899#M42337</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-07-08T07:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAMEPERIODLASTYEAR not working with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working-with-filters/m-p/1945232#M42344</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your useful tip. Now i created a datetable, and it's more or less working, the only thing is, that when i now filter via Jahr (from the "basistable") then&amp;nbsp;which is dependent on the scenario (Ist = 2010 - 2020, Reference scenario = 2020-2029) I still get the 2021 in the table in which I have the year from the date_tbl. can this still be excluded somehow? If I take the year Basistbelle (tabelle 1), the Measures are no longer correct&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, best Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 09:16:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working-with-filters/m-p/1945232#M42344</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-08T09:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAMEPERIODLASTYEAR not working with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working-with-filters/m-p/1945328#M42346</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , If you are using date table and time intelligence. Then take all time-related tables from the date table, not from the fact table. &lt;/P&gt;
&lt;P&gt;The year should come from date table if I got it correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 09:52:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working-with-filters/m-p/1945328#M42346</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-07-08T09:52:07Z</dc:date>
    </item>
  </channel>
</rss>

