<?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: Does function FILTER() work with another function given as a parameter? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/75655#M97</link>
    <description>&lt;P&gt;Hi Laurent Cuarto, first of all many thanks for your prompt response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to apologise for don't explain correctly the situation before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can see in Case C the real problem. In fact, once I give&amp;nbsp;the measure to the filter function,&amp;nbsp; the filter doesn't work as I want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img&gt;﻿&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the filter function doesn't accept a measure&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2016 10:49:10 GMT</pubDate>
    <dc:creator>almagir</dc:creator>
    <dc:date>2016-10-06T10:49:10Z</dc:date>
    <item>
      <title>Does function FILTER() work with another function given as a parameter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/74371#M91</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m trying to calculate table B from filtered table A (the filter condition is a cutting date):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img&gt;﻿&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know what I'm doing wrong in case B?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 12:00:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/74371#M91</guid>
      <dc:creator>almagir</dc:creator>
      <dc:date>2016-10-03T12:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Does function FILTER() work with another function given as a parameter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/74428#M92</link>
      <description>&lt;P&gt;This &lt;STRONG&gt;may&lt;/STRONG&gt; be related to: &lt;A href="http://www.sqlbi.com/articles/usage-of-dates-argument-in-a-row-context/" target="_blank"&gt;http://www.sqlbi.com/articles/usage-of-dates-argument-in-a-row-context/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The short explanation is: FIRSTDATE has an implicit CALCULATE and is evaluated depending on the row context of TableA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If correct, your condition probably evaluates to TRUE for each row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try with the MIN function instead.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 16:30:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/74428#M92</guid>
      <dc:creator>LaurentCouartou</dc:creator>
      <dc:date>2016-10-03T16:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Does function FILTER() work with another function given as a parameter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/75655#M97</link>
      <description>&lt;P&gt;Hi Laurent Cuarto, first of all many thanks for your prompt response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to apologise for don't explain correctly the situation before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can see in Case C the real problem. In fact, once I give&amp;nbsp;the measure to the filter function,&amp;nbsp; the filter doesn't work as I want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img&gt;﻿&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the filter function doesn't accept a measure&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 10:49:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/75655#M97</guid>
      <dc:creator>almagir</dc:creator>
      <dc:date>2016-10-06T10:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Does function FILTER() work with another function given as a parameter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/75805#M98</link>
      <description>&lt;P&gt;The article I linked to explains this in details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the short explanation ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;FILTER( Table, Table[date] &amp;lt;= FIRSTDATE(Dates[date]) )&lt;/PRE&gt;&lt;PRE&gt;FILTER( Table, Table[date] &amp;lt;= CALCULATE(MIN(Dates[date])) ) &lt;/PRE&gt;&lt;PRE&gt;FILTER( Table, Table[date] &amp;lt;= [MINDATE measure] )&lt;/PRE&gt;&lt;P&gt;... will all give you unexpected results because the right-hand side of your filter expression is calculated within the row context (it returns the date for the current row, that is &lt;EM&gt;Table[date]&lt;/EM&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a consequence, your inequality always evaluates to true.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the contrary, this should work:&lt;/P&gt;&lt;PRE&gt;FILTER( Table, Table[date] &amp;lt;= MIN(Dates[date]) )&lt;/PRE&gt;&lt;P&gt;The reason is this MIN(Dates[date]) is calculated for the current filter context your measure is evaluated in returns the same result for all rows in &lt;EM&gt;Table&lt;/EM&gt;. As a consequence, it will be true for some rows and not for others.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 15:24:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/75805#M98</guid>
      <dc:creator>LaurentCouartou</dc:creator>
      <dc:date>2016-10-06T15:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Does function FILTER() work with another function given as a parameter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/76778#M100</link>
      <description>&lt;P&gt;Hi LaurentCuarto,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to apologise, I haven't explained well what I'm trying to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've created this example in order to explain it better.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case A:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img&gt;﻿&lt;/img&gt;&lt;/P&gt;&lt;P&gt;Case B:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img&gt;﻿&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In these examples, Table 1 and Table 2 are input data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case A the result (Table 3), is filtered according to the minimum of Table 2[Date], that is correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case B the result (Table 3), isn't filtered according to the minimum of the filter (slicer), that references Table 2. In case B, the minimun date in the filter (slicer) is 05/10/2016, but Table 3 is cut by the date 03/10/2016, what isn't correct, it should be cut by the date 05/10/2016,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attach the link where is the Power BI Desktop document, that contains this example, just in case you want to open it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/7tawmtjz8a1ytdz/ej1.pbix?dl=0" target="_blank"&gt;https://www.dropbox.com/s/7tawmtjz8a1ytdz/ej1.pbix?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your attention.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2016 13:12:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/76778#M100</guid>
      <dc:creator>almagir</dc:creator>
      <dc:date>2016-10-10T13:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Does function FILTER() work with another function given as a parameter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/77087#M101</link>
      <description>&lt;P&gt;In your file Table3 is a calculated table ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculated tables are static parts of a model : their content will not change based on selections or slicers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use table expressions in measures to obtain dynamic selections, though ...&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 08:40:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/77087#M101</guid>
      <dc:creator>LaurentCouartou</dc:creator>
      <dc:date>2016-10-11T08:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Does function FILTER() work with another function given as a parameter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/77202#M102</link>
      <description>&lt;P&gt;Actually I don't need to calculate any table, so I can get by with thise:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SUMX(&lt;/P&gt;&lt;P&gt;FILTER(table1;table1[date]&amp;lt;=MIN(dates_min[date]))&lt;/P&gt;&lt;P&gt;;table1[A])&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you very much&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 11:44:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-function-FILTER-work-with-another-function-given-as-a/m-p/77202#M102</guid>
      <dc:creator>almagir</dc:creator>
      <dc:date>2016-10-11T11:44:12Z</dc:date>
    </item>
  </channel>
</rss>

