<?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: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201908#M19239</link>
    <description>&lt;P&gt;Thanks for the answers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to understand KEEPFILTER function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we solve this using KEEPFILTER ?&lt;/P&gt;</description>
    <pubDate>Sun, 05 Jul 2020 14:00:39 GMT</pubDate>
    <dc:creator>snph1777</dc:creator>
    <dc:date>2020-07-05T14:00:39Z</dc:date>
    <item>
      <title>DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201570#M19228</link>
      <description>&lt;P&gt;I am doing some training work in AdventureWorksDW database.&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;I have two measures:&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum of SalesAmount = SUM(FactInternetSales[SalesAmount])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthlyAverageSales = AVERAGEX (&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(DimDate[EnglishMonthName]),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Sum of SalesAmount]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;img /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have developed the above report, choosing only two years 2006 and 2007, and only 4 months using slicers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While the measure [Sum of SalesAmount] shows the correct value, the other measure [MonthlyAverageSales] shows incorrect data in the Total row; however, both measures are right, when aggregated for each year 2006 and 2007.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure&amp;nbsp;[MonthlyAverageSales] at the Total row should actually be $ 5,916,696.73/8, which is &lt;STRONG&gt;$ 739,587.09&lt;/STRONG&gt;.&amp;nbsp; (8 in denominator represents 8 months - Jan,Feb,Nov,Dec for &lt;U&gt;each&lt;/U&gt; year - 2006 and 2007)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead, what I see is&amp;nbsp;$ 5,916,696.73/4, which is&lt;STRONG&gt; $1,479,174.18&lt;/STRONG&gt;; (4 in denominator represents 4 months-&amp;nbsp; Jan,Feb,Nov,Dec, combining both years together)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I have changed the formula, and have created a new measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthlyAverageCorrect = AVERAGEX (&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; KEEPFILTERS(VALUES(DimDate[EnglishMonthName])),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Sum of SalesAmount]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/STRONG&gt;&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;I still do not see any change. Instead of getting&amp;nbsp;$ 739,587.09, I still see&amp;nbsp;$1,479,174.18.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where am I in error ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 15:23:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201570#M19228</guid>
      <dc:creator>snph1777</dc:creator>
      <dc:date>2020-07-05T15:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201597#M19230</link>
      <description>&lt;P&gt;Your Averagex iterates over the 4 months, &amp;nbsp;not the 8 unique combinations of year and month. If you want to iterate over the instances of the months, you need a measure that will do that. You could try replacing values(cal[month name]) with summarize(sales,cal[month name],cal[year])&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 01:26:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201597#M19230</guid>
      <dc:creator>MattAllington</dc:creator>
      <dc:date>2020-07-05T01:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201764#M19231</link>
      <description>&lt;P&gt;Create a new column in date table that has month and year in same column example: January 2020 and then inside the measure use this column.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MonthlyAverageCorrect =
AVERAGEX ( VALUES ( DimDate[Year Month] ), [Sum of SalesAmount] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 08:21:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201764#M19231</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-07-05T08:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201908#M19239</link>
      <description>&lt;P&gt;Thanks for the answers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to understand KEEPFILTER function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we solve this using KEEPFILTER ?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 14:00:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201908#M19239</guid>
      <dc:creator>snph1777</dc:creator>
      <dc:date>2020-07-05T14:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201910#M19240</link>
      <description>Can you post the pbix file? Because the measure with KEEPFILTERS is correct.</description>
      <pubDate>Sun, 05 Jul 2020 14:03:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201910#M19240</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-07-05T14:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201928#M19245</link>
      <description>&lt;P&gt;I am not able to post the file, since I am a new member.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But all the measures and the data model relationships are shown as pictures.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 14:32:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201928#M19245</guid>
      <dc:creator>snph1777</dc:creator>
      <dc:date>2020-07-05T14:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201931#M19247</link>
      <description>Upload the file to dropbox, google drive and share the link for the file.</description>
      <pubDate>Sun, 05 Jul 2020 14:36:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201931#M19247</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-07-05T14:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201946#M19250</link>
      <description>&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1mXeWjF0dw33KL4Vg-q3h8l3jGqB2oVJX/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1mXeWjF0dw33KL4Vg-q3h8l3jGqB2oVJX/view?usp=sharing&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 14:56:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201946#M19250</guid>
      <dc:creator>snph1777</dc:creator>
      <dc:date>2020-07-05T14:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201959#M19252</link>
      <description>&lt;P&gt;You could try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Avg =
AVERAGEX (
    KEEPFILTERS (
        FILTER (
            ALL ( DimDate[EnglishMonthName], DimDate[CalendarYear] ),
            [Sum of SalesAmount] &amp;gt; 0
        )
    ),
    [Sum of SalesAmount]
)&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Avg CROSSFILTER = 
AVERAGEX (
    CROSSJOIN (
        DISTINCT ( DimDate[EnglishMonthName] ),
        DISTINCT ( DimDate[CalendarYear] )
    ),
    [Sum of SalesAmount]
)&lt;/LI-CODE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Avg SUMMARIZE=
AVERAGEX (
    SUMMARIZE ( DimDate, DimDate[EnglishMonthName], DimDate[CalendarYear] ),
    [Sum of SalesAmount]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 05 Jul 2020 15:25:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201959#M19252</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-07-05T15:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201986#M19254</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="243629" data-lia-user-login="snph1777" class="lia-mention lia-mention-user"&gt;snph1777&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if this is monthly average.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you just need the total divide by the no. of months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use this measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Avg SUMMARIZE = 

var a = DISTINCTCOUNT(DimDate[YearMonthValue])

RETURN
[Sum of SalesAmount]/a&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 16:29:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201986#M19254</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-05T16:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201990#M19255</link>
      <description>&lt;P&gt;Ok thanks; any reason, why my formula did not work ? I have imported an Excel Power Pivot workbook into Power BI&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 16:36:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1201990#M19255</guid>
      <dc:creator>snph1777</dc:creator>
      <dc:date>2020-07-05T16:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1202010#M19257</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 17:15:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1202010#M19257</guid>
      <dc:creator>snph1777</dc:creator>
      <dc:date>2020-07-05T17:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1202011#M19258</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 17:16:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1202011#M19258</guid>
      <dc:creator>snph1777</dc:creator>
      <dc:date>2020-07-05T17:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - KEEPFILTERS not showing correct results - arbitrarily shaped set</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1202014#M19259</link>
      <description>&lt;P&gt;Because when context transition happens it creates a filter for each month and then overwrites existing filter over months but the years remain untouched and let's say the first value from VALUES () is January due to context transition CALCULATE overwrites filters over months and the new filter is with January, January is calculated both for 2007 &amp;amp; 2008, so either you use&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Average Sales = 
AVERAGEX( 
    VALUES( 'Date'[Calendar Year Month]) , 
    [Total Sales]
) &lt;/LI-CODE&gt;&lt;P&gt;or the options above, creating a column in Date table is more efficient than KEEPFILTERS&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 17:20:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-KEEPFILTERS-not-showing-correct-results-arbitrarily-shaped/m-p/1202014#M19259</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-07-05T17:20:16Z</dc:date>
    </item>
  </channel>
</rss>

