<?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: Calculate a previous period Sum in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-a-previous-period-Sum/m-p/1920028#M41624</link>
    <description>&lt;P&gt;Looks like this works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PrevPlanPaid = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Var D = DATESBETWEEN(Dates[Date], DateAdd(firstdate(Dates[Date]), -1, year), DATEADD(LASTDATE(Dates[Date]), -1, YEAR))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;return CALCULATE(Sum(MedClaims[PlanPaid]), REMOVEFILTERS(ReportPeriods), D)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 24 Jun 2021 12:47:21 GMT</pubDate>
    <dc:creator>spartan27244</dc:creator>
    <dc:date>2021-06-24T12:47:21Z</dc:date>
    <item>
      <title>Calculate a previous period Sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-a-previous-period-Sum/m-p/1907205#M41188</link>
      <description>&lt;P&gt;As in the example on this page&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax" target="_blank" rel="noopener"&gt;SAMEPERIODLASTYEAR function (DAX) - DAX | Microsoft Docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;= CALCULATE(SUM(ResellerSales_USD[SalesAmount_USD]), SAMEPERIODLASTYEAR(DateTime[DateKey]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I too am trying to do the same, my measuer formula is as so&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PrevPrdPlanPaid = CALCULATE(Sum(MedClaims[PlanPaid]), SAMEPERIODLASTYEAR(Dates[Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However my visual always shows a blank, when it should show for example in 2019-FY 10,503,949.37 i.e. the 2018-FY value, etc. I know this seems point less but the number will be used to calculate a rate of change which is simple math once I can get the number. I have attached PBX file, well apparently I cannot attach a file so here is the onedrive link&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://mycatalyst-my.sharepoint.com/:u:/p/ltaylor23/ERyJGLMYHB9NsQO9pcEdlT4BYWfQrOR8-4VlIpYei0poqg?e=s7JdhP" target="_blank" rel="noopener"&gt;https://mycatalyst-my.sharepoint.com/:u:/p/ltaylor23/ERyJGLMYHB9NsQO9pcEdlT4BYWfQrOR8-4VlIpYei0poqg?e=s7JdhP&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;My data model is very simple, note the Date table is Marked as a Date Table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img /&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;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Jun 2021 18:04:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-a-previous-period-Sum/m-p/1907205#M41188</guid>
      <dc:creator>spartan27244</dc:creator>
      <dc:date>2021-06-17T18:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a previous period Sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-a-previous-period-Sum/m-p/1907400#M41204</link>
      <description>&lt;P&gt;For most seansoned DAX users, both cross filtering direction (bi-directions) in data model is time bomb rather than cure-all. At least for me, I rely on mono-directional relations in data model.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 20:32:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-a-previous-period-Sum/m-p/1907400#M41204</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2021-06-17T20:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a previous period Sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-a-previous-period-Sum/m-p/1917703#M41539</link>
      <description>&lt;P&gt;By removing the bidirectional filter, none of the other visuals are calculated properly&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 14:27:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-a-previous-period-Sum/m-p/1917703#M41539</guid>
      <dc:creator>spartan27244</dc:creator>
      <dc:date>2021-06-23T14:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a previous period Sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-a-previous-period-Sum/m-p/1920028#M41624</link>
      <description>&lt;P&gt;Looks like this works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PrevPlanPaid = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Var D = DATESBETWEEN(Dates[Date], DateAdd(firstdate(Dates[Date]), -1, year), DATEADD(LASTDATE(Dates[Date]), -1, YEAR))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;return CALCULATE(Sum(MedClaims[PlanPaid]), REMOVEFILTERS(ReportPeriods), D)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Jun 2021 12:47:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-a-previous-period-Sum/m-p/1920028#M41624</guid>
      <dc:creator>spartan27244</dc:creator>
      <dc:date>2021-06-24T12:47:21Z</dc:date>
    </item>
  </channel>
</rss>

