<?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: Can't seem to apply SAMEPERIODLASTYEAR correctly in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-seem-to-apply-SAMEPERIODLASTYEAR-correctly/m-p/1857691#M39769</link>
    <description>&lt;P&gt;To try and break this down a bit to a more simpler calculation to get the flow...&lt;/P&gt;&lt;P&gt;A simple sum of a Base Table Amount "MedPlanPaid" is shown on the left of the grid, next to it is a measure that calculates the exact same value as Sum(MedPlanPaid), The problem in this context is how to reference&amp;nbsp; the previous year. So in the grid the PY calculation (far right) should show the same value as the previous row (i.e. previous year). If I can do that, then I can expound on the calculation to get where I want to go. Here is a snapshot of the visual&amp;nbsp;&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;And a snippet of the model showing the replation show between report periods, the date table and the claims data&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 May 2021 21:20:07 GMT</pubDate>
    <dc:creator>spartan27244</dc:creator>
    <dc:date>2021-05-21T21:20:07Z</dc:date>
    <item>
      <title>Can't seem to apply SAMEPERIODLASTYEAR correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-seem-to-apply-SAMEPERIODLASTYEAR-correctly/m-p/1857642#M39761</link>
      <description>&lt;P&gt;The following calculation gives me a value called PMPM on my report correctly, and displays the correct amounts.&lt;/P&gt;&lt;P&gt;PMPM = Sum(Paid) / Sum(MM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to get the previous years I was attempting&lt;/P&gt;&lt;P&gt;PMPM-PY = Calculate(Sum(Paid) / Sum(MM), SAMEPPERIODLASTYEAR(Dates[Date]))&lt;/P&gt;&lt;P&gt;Where Dates is my Marked Date table, however this does not yield any results. The PMPM calculation is cleary confined to the time period on the report, currently (10/1/2019 - 9/20/2020) so I am uncertain of why the previous year would not be able to infer this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 20:18:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-seem-to-apply-SAMEPERIODLASTYEAR-correctly/m-p/1857642#M39761</guid>
      <dc:creator>spartan27244</dc:creator>
      <dc:date>2021-05-21T20:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can't seem to apply SAMEPERIODLASTYEAR correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-seem-to-apply-SAMEPERIODLASTYEAR-correctly/m-p/1857660#M39765</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="213397" data-lia-user-login="spartan27244" class="lia-mention lia-mention-user"&gt;spartan27244&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Did not quite got it, anyhow , can you try this modified version:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;PMPM-PY = 
DIVIDE(
    Sum(Table[Paid]),
    Calculate(
        Sum(Table[Paid]),SAMEPERIODLASTYEAR(Dates[Date])
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 20:34:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-seem-to-apply-SAMEPERIODLASTYEAR-correctly/m-p/1857660#M39765</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2021-05-21T20:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can't seem to apply SAMEPERIODLASTYEAR correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-seem-to-apply-SAMEPERIODLASTYEAR-correctly/m-p/1857691#M39769</link>
      <description>&lt;P&gt;To try and break this down a bit to a more simpler calculation to get the flow...&lt;/P&gt;&lt;P&gt;A simple sum of a Base Table Amount "MedPlanPaid" is shown on the left of the grid, next to it is a measure that calculates the exact same value as Sum(MedPlanPaid), The problem in this context is how to reference&amp;nbsp; the previous year. So in the grid the PY calculation (far right) should show the same value as the previous row (i.e. previous year). If I can do that, then I can expound on the calculation to get where I want to go. Here is a snapshot of the visual&amp;nbsp;&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;And a snippet of the model showing the replation show between report periods, the date table and the claims data&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 21:20:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Can-t-seem-to-apply-SAMEPERIODLASTYEAR-correctly/m-p/1857691#M39769</guid>
      <dc:creator>spartan27244</dc:creator>
      <dc:date>2021-05-21T21:20:07Z</dc:date>
    </item>
  </channel>
</rss>

