<?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: How to get previous year data for the first year of filtered data in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-previous-year-data-for-the-first-year-of-filtered/m-p/1153690#M17599</link>
    <description>&lt;P&gt;I continue to research.&amp;nbsp; &amp;nbsp;It seems like I'm missing something with changing context, but could really use some pointers.&amp;nbsp; Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jun 2020 17:41:02 GMT</pubDate>
    <dc:creator>IsaacAsher</dc:creator>
    <dc:date>2020-06-11T17:41:02Z</dc:date>
    <item>
      <title>How to get previous year data for the first year of filtered data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-previous-year-data-for-the-first-year-of-filtered/m-p/1142419#M17135</link>
      <description>&lt;P&gt;(Apologies if this gets double posted.... I posted once but it is not showing in the forum after 20+ minutes it still isn't showing, so posting a second time on the assumption I did something wrong or accidentally backed out of it.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to use a measure to calculate the average of a value over the entire previous year, and compare it to the same value&lt;BR /&gt;for every month shown in the visual. MyCal is my date table, created using CALENDARAUTO(). Batches is my fact table.&lt;/P&gt;&lt;P&gt;Here is the formula I am currently using:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CL = CALCULATE(AVERAGE(Batches[RR]), PREVIOUSYEAR(MyCal[Date]))&lt;/LI-CODE&gt;&lt;P&gt;This works beautifully, and returns the expected value. Since this formula looks at the prior year, it is blank for the first year of data as filtered by the end user. I want this formula to calculate the average of [RR] over the previous year regardless of what year(s)&lt;BR /&gt;the user selected in the report filter.&lt;/P&gt;&lt;P&gt;I also tried this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CL = CALCULATE(AVERAGE(Batches[RR]), ALL(MyCal[Date], PREVIOUSYEAR(MyCal[Date].[Date]))&lt;/LI-CODE&gt;&lt;P&gt;but it had no effect on the results. The first year of data remains blank.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have re-created the results in Excel so I can remove sensitive data and to clearly show the desired result set.&lt;/P&gt;&lt;P&gt;Here is what I'm currently getting:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And here is what I'm aiming for:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:08:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-previous-year-data-for-the-first-year-of-filtered/m-p/1142419#M17135</guid>
      <dc:creator>IsaacAsher</dc:creator>
      <dc:date>2020-06-04T16:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous year data for the first year of filtered data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-previous-year-data-for-the-first-year-of-filtered/m-p/1142583#M17140</link>
      <description>&lt;P&gt;Can you share a sample of your source data so we can work from there, also the data model.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 17:29:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-previous-year-data-for-the-first-year-of-filtered/m-p/1142583#M17140</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-04T17:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous year data for the first year of filtered data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-previous-year-data-for-the-first-year-of-filtered/m-p/1142681#M17144</link>
      <description>&lt;P&gt;I am uncertain what you are asking for when you want to see a sample of the source data.&amp;nbsp; There is sensitive information in the data, so I need to be careful about what I am sharing.&amp;nbsp; Could you please be a little more specific?&amp;nbsp; Sorry, still a noob.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the data model:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 18:40:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-previous-year-data-for-the-first-year-of-filtered/m-p/1142681#M17144</guid>
      <dc:creator>IsaacAsher</dc:creator>
      <dc:date>2020-06-04T18:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous year data for the first year of filtered data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-previous-year-data-for-the-first-year-of-filtered/m-p/1153690#M17599</link>
      <description>&lt;P&gt;I continue to research.&amp;nbsp; &amp;nbsp;It seems like I'm missing something with changing context, but could really use some pointers.&amp;nbsp; Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 17:41:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-previous-year-data-for-the-first-year-of-filtered/m-p/1153690#M17599</guid>
      <dc:creator>IsaacAsher</dc:creator>
      <dc:date>2020-06-11T17:41:02Z</dc:date>
    </item>
  </channel>
</rss>

