<?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 Report filter not working with DAX Calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072596#M14971</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like some help with this one please. I have the below DAX calculation and it is working fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TEST Custom Sales =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [Sales],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FILTER (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SalesFact,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RELATED('Date'[Financial Year]) = Max( 'Date'[Financial Year] )&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The issue is when I select a value from a report filter, for example Product = "Shoes", the calculation returns (Blank)..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the other hand when i specify a fixed value in the filter, the&amp;nbsp; product filter works fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TEST Custom Sales =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [Sales],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FILTER (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SalesFact,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RELATED('Date'[Financial Year]) = 2020&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tables Date, Product, SalesFact are linked properly so there is no issues with the model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me resolve this problem?&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2020 11:11:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-05T11:11:18Z</dc:date>
    <item>
      <title>Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072596#M14971</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like some help with this one please. I have the below DAX calculation and it is working fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TEST Custom Sales =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [Sales],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FILTER (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SalesFact,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RELATED('Date'[Financial Year]) = Max( 'Date'[Financial Year] )&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The issue is when I select a value from a report filter, for example Product = "Shoes", the calculation returns (Blank)..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the other hand when i specify a fixed value in the filter, the&amp;nbsp; product filter works fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TEST Custom Sales =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [Sales],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FILTER (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SalesFact,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RELATED('Date'[Financial Year]) = 2020&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tables Date, Product, SalesFact are linked properly so there is no issues with the model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me resolve this problem?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 11:11:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072596#M14971</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T11:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072604#M14972</link>
      <description>&lt;P&gt;It is difficult to know what is wrong with the information provided.&amp;nbsp;Please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is the Product column in the SalesFact table? If not, there could be a relationship issue or something going on.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 11:07:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072604#M14972</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-05-05T11:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072608#M14974</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I updated the main topic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are no relationship issues in the model,. As per main topic the calculation seems to work fine when a fixed value is used in the calculation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 11:10:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072608#M14974</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T11:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072625#M14977</link>
      <description>What is this measure trying to achieve?&lt;BR /&gt;&lt;BR /&gt;By the way , filtering by a full (expanded) table is a very dangerous and bad idea as you will learn very soon when you start creating other measures based on this one.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Tue, 05 May 2020 11:19:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072625#M14977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T11:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072632#M14980</link>
      <description>&lt;P&gt;Thanks for your message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea behind the calculation is to calculate total sales for financial periods. Sadly i cannot use conventional calendar calculations hence have to do it this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestion on how to accomplish this?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 11:22:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072632#M14980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T11:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072643#M14981</link>
      <description>What about other products when you filter by them? Does this affect all of them?&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Tue, 05 May 2020 11:31:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072643#M14981</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T11:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072649#M14982</link>
      <description>&lt;P&gt;Yes Product filters all items in the SalesFact table in this case&lt;/P&gt;&lt;P&gt;The odd thing the calculation returns blank when selecting a product from a slicer, but as per example the calculation works when the Financial year is set to a fixed date ex 2020&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 11:33:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072649#M14982</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T11:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072661#M14985</link>
      <description>&lt;P&gt;This does the same but is following Best Practices and it's safe to use in other measures:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Custom Sales] =
var __lastVisibleFY = max( 'Date'[Financial Year] )
return
	CALCULATE (
	      [Sales],
	      keepfilters(
	      	'Date'[Financial Year] = __lastVisibleFY 
	      )
	)&lt;/LI-CODE&gt;
&lt;P&gt;Also, for this to work you have to make sure that you do not slice by columns in the fact table, only through dimensions. What the above does is it grabs the last &lt;STRONG&gt;visible (in the current context)&lt;/STRONG&gt;&amp;nbsp;financial year from the Calendar and from the visible dates it only picks up the ones that are in this very last year, so [Sales] is calculated with all other filters on apart from maybe the Calendar in which only the dates from the last visible FY have been made active (within the current context, without overwriting any other filters that may exist on the Calendar).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this what you want? Please note that this measure does exactly what your original measure does.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 11:38:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072661#M14985</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T11:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072665#M14986</link>
      <description>IF this still has issues, please return from the measure the last visible FY to see what gets calculated in the context.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Tue, 05 May 2020 11:40:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072665#M14986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T11:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072671#M14988</link>
      <description>&lt;P&gt;Thanks, yes agreed but still do not understand as to why the Product filter does not work with athe calculation. This is really strange behaviour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also do you suggest using keepfilters rather than using Filter?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 11:44:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072671#M14988</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T11:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072764#M14994</link>
      <description>I always suggest that one should learn the mechanics of DAX well &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; One golden rule of DAX is: NEVER FILTER A TABLE WHEN YOU CAN FILTER A COLUMN.&lt;BR /&gt;&lt;BR /&gt;KEEPFILTERS should only be used when and where needed and this depends on what you are trying to  achieve.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Tue, 05 May 2020 12:23:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072764#M14994</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T12:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072766#M14995</link>
      <description>To be able to tell you WHY it does not work, I'd need to see the model and the data.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Tue, 05 May 2020 12:23:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072766#M14995</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T12:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072822#M14997</link>
      <description>&lt;P&gt;What is the better way to share the pbi dashboard / data model in a forum like this ?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 12:50:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1072822#M14997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T12:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Report filter not working with DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1073204#M15008</link>
      <description>If you want to share it with me only, then place the file somewhere on a shared drive and send me a link to it via a private message. Click my "avatar" (same as yours) and you'll be able to send a message.... If you want to share it publicly, post the link here.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Tue, 05 May 2020 14:58:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Report-filter-not-working-with-DAX-Calculation/m-p/1073204#M15008</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T14:58:48Z</dc:date>
    </item>
  </channel>
</rss>

