<?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: Filter Context / Transition Help in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2205337#M51872</link>
    <description>&lt;P&gt;Thanks very much Owen, really helpful.&amp;nbsp; Working my way through 'Definitive Guide to Dax' and haven't had a good look into expanded tables just yet, will make sure to do so.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Nov 2021 08:51:02 GMT</pubDate>
    <dc:creator>Badger43</dc:creator>
    <dc:date>2021-11-24T08:51:02Z</dc:date>
    <item>
      <title>Filter Context / Transition Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2197036#M51484</link>
      <description>&lt;P&gt;I've been using Power BI for a while and as a non technical user have more recently started studying DAX and context transition in greater detail.&amp;nbsp; I feel I am making progress but am stumped by the following&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a measure [NoOfAccounts] in a dimension table (Accounts) to distinctcount the dimension linked to my fact tables (Expense)....&lt;/P&gt;&lt;P&gt;[NoofAccounts]=DISTINCTCOUNT([Exp Code])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whilst experimenting I set up the following measure to try and count only facts used in the Expense Table....&lt;/P&gt;&lt;P&gt;[NoofUsedAccounts] = CALCULATE([NoofAccounts],Expense)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am referencing the expense table in the filter parameter of caclulate and yet I seem to get the right answer, and am struggling to understand where the transition is occuring here.&amp;nbsp; If I swap to reference a column rather than the table then the answer is wrong so I am confused and would love to understand why the table reference in the filter clause worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I have written a better more udnerstansable measure but would still love to understand why this poorly structured code seemed to work -&amp;nbsp; Thanks very much in advance).&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 16:03:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2197036#M51484</guid>
      <dc:creator>Badger43</dc:creator>
      <dc:date>2021-11-18T16:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Context / Transition Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2199794#M51620</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="328800" data-lia-user-login="Badger43" class="lia-mention lia-mention-user"&gt;Badger43&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The measure you have written is one version of a related distinct count measure.&lt;/P&gt;
&lt;P&gt;See here for a similar example:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.daxpatterns.com/related-distinct-count-excel-2013/" target="_blank" rel="noopener"&gt;https://www.daxpatterns.com/related-distinct-count-excel-2013/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;The important concept here is "expanded tables". Providing Expense as a filter argument actually adds the expanded Expense table as a filter, which includes columns of all tables on the 1-side of a relationship with Expense, so includes all columns of Accounts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The result is that rows of Accounts related to the visible rows of Expense become filters, and [NoofAccounts] gives the expected result.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;This is a good article on expanded tables:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/expanded-tables-in-dax/" target="_blank" rel="noopener"&gt;https://www.sqlbi.com/articles/expanded-tables-in-dax/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Owen&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 00:12:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2199794#M51620</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2021-11-21T00:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Context / Transition Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2205337#M51872</link>
      <description>&lt;P&gt;Thanks very much Owen, really helpful.&amp;nbsp; Working my way through 'Definitive Guide to Dax' and haven't had a good look into expanded tables just yet, will make sure to do so.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 08:51:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2205337#M51872</guid>
      <dc:creator>Badger43</dc:creator>
      <dc:date>2021-11-24T08:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Context / Transition Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2207461#M51999</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="328800" data-lia-user-login="Badger43" class="lia-mention lia-mention-user"&gt;Badger43&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Could you please mark your post as &lt;STRONG&gt;Answered&lt;/STRONG&gt; if &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp; has answered your questions? This will help the others in the community to find this solution easily if they encounter a similar problem to yours. Thank you.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 09:47:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2207461#M51999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-25T09:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Context / Transition Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2207463#M52000</link>
      <description>&lt;P&gt;Was unaware of this option but believe I have done so now, thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 09:49:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Transition-Help/m-p/2207463#M52000</guid>
      <dc:creator>Badger43</dc:creator>
      <dc:date>2021-11-25T09:49:51Z</dc:date>
    </item>
  </channel>
</rss>

