<?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: Adding a column filter to this date filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-column-filter-to-this-date-filter/m-p/2599400#M75099</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Have a column month year and try like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last3year1 = CALCULATE(AverageX(Values(DATA_DAILY_MONTHLY[Month Year]), DATA_DAILY_MONTHLY[VALUE])&lt;BR /&gt;,DATESINPERIOD(DATA_DAILY_MONTHLY[DT],LASTDATE(DATA_DAILY_MONTHLY[DT]),-36,MONTH))&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jun 2022 05:31:22 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-06-24T05:31:22Z</dc:date>
    <item>
      <title>Adding a column filter to this date filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-column-filter-to-this-date-filter/m-p/2598642#M75050</link>
      <description>&lt;P&gt;I want to calculate the average for the last 3 years by value for each month. Average of 2022, 2021, 2020, one value for January, Feb, March, etc. Where could I put a filter on a column here? Like ID = "200060"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have so far:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;36Month = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DATA_DAILY_MONTHLY[VALUE]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATESINPERIOD&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;DATA_DAILY_MONTHLY[Year-Mon]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;DATA_DAILY_MONTHLY[Year-Mon]&lt;/SPAN&gt;&lt;SPAN&gt;), -&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;YEAR&lt;/SPAN&gt;&lt;SPAN&gt; ))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Jun 2022 13:40:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-column-filter-to-this-date-filter/m-p/2598642#M75050</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-24T13:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a column filter to this date filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-column-filter-to-this-date-filter/m-p/2599400#M75099</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Have a column month year and try like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last3year1 = CALCULATE(AverageX(Values(DATA_DAILY_MONTHLY[Month Year]), DATA_DAILY_MONTHLY[VALUE])&lt;BR /&gt;,DATESINPERIOD(DATA_DAILY_MONTHLY[DT],LASTDATE(DATA_DAILY_MONTHLY[DT]),-36,MONTH))&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 05:31:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-column-filter-to-this-date-filter/m-p/2599400#M75099</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-06-24T05:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a column filter to this date filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-column-filter-to-this-date-filter/m-p/2609024#M75605</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try adding the filter() function in the formula.&lt;/P&gt;
&lt;DIV&gt;36Month =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( DATA_DAILY_MONTHLY[VALUE] ),&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;FILTER ( DATA_DAILY_MONTHLY, DATA_DAILY_MONTHLY[ID] = "200060" ),&lt;/FONT&gt;&lt;BR /&gt;DATESINPERIOD (&lt;BR /&gt;DATA_DAILY_MONTHLY[Year-Mon],&lt;BR /&gt;MAX ( DATA_DAILY_MONTHLY[Year-Mon] ),&lt;BR /&gt;-3,&lt;BR /&gt;YEAR&lt;BR /&gt;)&lt;BR /&gt;)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Best Regards,&lt;/DIV&gt;
&lt;DIV&gt;Jay&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Jun 2022 09:37:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-a-column-filter-to-this-date-filter/m-p/2609024#M75605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-29T09:37:07Z</dc:date>
    </item>
  </channel>
</rss>

