<?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: Sales PY for Non Contiguous date range in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-PY-for-Non-Contiguous-date-range/m-p/4130634#M164067</link>
    <description>&lt;P&gt;Please share sample data and desired out put.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2024 07:17:02 GMT</pubDate>
    <dc:creator>Rupak_bi</dc:creator>
    <dc:date>2024-09-03T07:17:02Z</dc:date>
    <item>
      <title>Sales PY for Non Contiguous date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-PY-for-Non-Contiguous-date-range/m-p/4130434#M164057</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I was using the below calculation to find the PY Sales Value,&lt;BR /&gt;Sales SPLY = Calculate([Sales],SAMEPERIODLASTYEAR('sales'[Sales Date]))&lt;BR /&gt;but get the error SAMEPERIODLASTYEAR expects a contiguous selection when the date column is not unique, has gaps or it contains time portions becuase I dont have sales continuously everyday.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried the Dateadd function, but still same issue arises.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is there other ways to calculate the PY measure dynamically?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 05:50:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-PY-for-Non-Contiguous-date-range/m-p/4130434#M164057</guid>
      <dc:creator>dataandme</dc:creator>
      <dc:date>2024-09-03T05:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sales PY for Non Contiguous date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-PY-for-Non-Contiguous-date-range/m-p/4130625#M164066</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="720547" data-lia-user-login="dataandme" class="lia-mention lia-mention-user"&gt;dataandme&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;don't you have a calendar / date table? If not, you should build one, connect it with the fact table with 1:* realationship (from 'Calendar'[Date] to 'Sales'[Sales Date]), then use this calendar table in your calculate, instead of&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Calculate([Sales],SAMEPERIODLASTYEAR('sales'[Sales Date]))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;it becomes&amp;nbsp;&amp;nbsp;Calculate([Sales],SAMEPERIODLASTYEAR('Calendar'[Date]))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 07:13:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-PY-for-Non-Contiguous-date-range/m-p/4130625#M164066</guid>
      <dc:creator>Gabry</dc:creator>
      <dc:date>2024-09-03T07:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sales PY for Non Contiguous date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-PY-for-Non-Contiguous-date-range/m-p/4130634#M164067</link>
      <description>&lt;P&gt;Please share sample data and desired out put.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 07:17:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-PY-for-Non-Contiguous-date-range/m-p/4130634#M164067</guid>
      <dc:creator>Rupak_bi</dc:creator>
      <dc:date>2024-09-03T07:17:02Z</dc:date>
    </item>
  </channel>
</rss>

