<?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: CALCULATETABLE doesn't filter rows with current filter context in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3023926#M103022</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I am not using a visual here, I check the number of rows returned by CALCULATETABLE from data tab.&lt;BR /&gt;Year is fixed with value 2022 by user from filter section but number of rows returned correspond to year 2023&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;When I use this expression in a measure "&lt;STRONG&gt;YEAR ( f_MNT_visits[DatePlan.]) = YEAR ( MAX ( d_dates[Date] ) )"&lt;BR /&gt;&lt;/STRONG&gt;the filter is applied from filter context but for a table generated by CALCULATETABLE the filter is applied from the max value of my dates table.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jan 2023 18:27:39 GMT</pubDate>
    <dc:creator>Handlordz</dc:creator>
    <dc:date>2023-01-16T18:27:39Z</dc:date>
    <item>
      <title>CALCULATETABLE doesn't filter rows with current filter context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3023885#M103012</link>
      <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have an issue with CALCULATETABLE function:&lt;BR /&gt;My fact table 'f_MNT_visits' is connected to a dates table with a range of date from year 2021 to year 2023.&lt;BR /&gt;I need to filter my fact table from year selected by user from filter pages.&lt;BR /&gt;I expect by using MAX function that fact table will be filtered from filter context (range of dates selected by the user).&lt;BR /&gt;I get the max year of date table instead: If user select year 2022, the table is filtered on 2023.&lt;BR /&gt;I wrote my dax code like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;CALCULATETABLE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; f_MNT_visits,&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; YEAR ( f_MNT_visits[DatePlan.]) = YEAR ( MAX ( d_dates[Date] ) )&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I filter my fact table from year select by the user and not from max value of the dates table.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance for your support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 17:50:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3023885#M103012</guid>
      <dc:creator>Handlordz</dc:creator>
      <dc:date>2023-01-16T17:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATETABLE doesn't filter rows with current filter context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3023892#M103015</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="499774" data-lia-user-login="Handlordz" class="lia-mention lia-mention-user"&gt;Handlordz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume that you have disabled the interaction between the the visual and the slicer?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 18:05:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3023892#M103015</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-16T18:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATETABLE doesn't filter rows with current filter context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3023926#M103022</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I am not using a visual here, I check the number of rows returned by CALCULATETABLE from data tab.&lt;BR /&gt;Year is fixed with value 2022 by user from filter section but number of rows returned correspond to year 2023&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;When I use this expression in a measure "&lt;STRONG&gt;YEAR ( f_MNT_visits[DatePlan.]) = YEAR ( MAX ( d_dates[Date] ) )"&lt;BR /&gt;&lt;/STRONG&gt;the filter is applied from filter context but for a table generated by CALCULATETABLE the filter is applied from the max value of my dates table.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 18:27:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3023926#M103022</guid>
      <dc:creator>Handlordz</dc:creator>
      <dc:date>2023-01-16T18:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATETABLE doesn't filter rows with current filter context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3023966#M103026</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="499774" data-lia-user-login="Handlordz" class="lia-mention lia-mention-user"&gt;Handlordz&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Calculated tables do no interact with slicers. They simply do not read the filter context. Dynamic calculated tables are not possible. What are you trying to achieve?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 18:52:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3023966#M103026</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-16T18:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATETABLE doesn't filter rows with current filter context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3025094#M103111</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thank you for your feedback and help for my issue.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have to provide a list of exceptions from a portfolio file that entries don't match with my fact table&amp;nbsp;&lt;SPAN&gt;'f_MNT_visits'.&lt;BR /&gt;Below my complete DAX code which runs well and retuns the number of rows I expect when I specify explicitly the year:&lt;BR /&gt;&lt;/SPAN&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;&lt;SPAN&gt;However, this list varies according year selected by user from filter panel.&lt;BR /&gt;So I need to read dynamically year selected by user to filter the list accordingly.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As I mentionned in my first post, code below get max date from my dates table instead of max date from filter context (when the user selects a specific year).&lt;/SPAN&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 understand, it is not possible to read the filter context for a virtual table. Could you please confirm me ?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 08:30:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CALCULATETABLE-doesn-t-filter-rows-with-current-filter-context/m-p/3025094#M103111</guid>
      <dc:creator>Handlordz</dc:creator>
      <dc:date>2023-01-17T08:30:33Z</dc:date>
    </item>
  </channel>
</rss>

