<?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 in dax with relationship clarify in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3730166#M145348</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = CALCULATE(DISTINCTCOUNT(User[Name]),CROSSFILTER(Sales[ID_user],User[ID_user],Both))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2024 09:33:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-28T09:33:34Z</dc:date>
    <item>
      <title>Filter context in dax with relationship clarify</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3728603#M145276</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;first of all, I study Definitive guide to dax vol2, reading blogs of sqlbi.com etc..so please do not respond that I should watch it&lt;/P&gt;&lt;P&gt;I still fighting witch filter context,&lt;/P&gt;&lt;P&gt;I have following easy use case based on following tables &lt;img /&gt;&lt;/P&gt;&lt;P&gt;schema is simple&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;And here starts my questions (not only one)&amp;nbsp; if I want to write DAX measure which will count user per each city,&lt;/P&gt;&lt;P&gt;1) why I cannot do it with following formula?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;User per City =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;User&lt;/SPAN&gt;&lt;SPAN&gt;[ID_user]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;Location&lt;/SPAN&gt;&lt;SPAN&gt;[ID_location]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;result is this:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;when there is connection between data, connection is in fact table. Data can be matched and calculated in here, why it is not possible to do it in "mid table" ?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2) if I will allow both directional ways it works&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;it means that ALWAYS when I need to do calculation in target table (table users, because users are calculated) filter context must be linked to each other ?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;3) Is it possible somehow to write DAX measure from question 1) to meet my goal without adjusting Data Model ??&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thank you so much !&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;still try practice DAX and read articles about it,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thanks for deep dive explanation if possible !!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thanks in advance&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Feb 2024 20:00:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3728603#M145276</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-27T20:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Filter context in dax with relationship clarify</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3729254#M145304</link>
      <description>&lt;P&gt;Filter context is best conquered with matrix visuals and with their cousins SUMMARIZE and SUMMARIZECOLUMNS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Put your dimension users into rows of a matrix visual, dimension locations into colums, and count of Value (not sum!) in the values.&amp;nbsp; That will give you a graphical idea of the solution to your question.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 03:12:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3729254#M145304</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-28T03:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Filter context in dax with relationship clarify</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3729676#M145323</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for tip / best practicte !!! but unfortunatelly it doesn t reply on my questions &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; can you please reply on them pls ? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 06:44:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3729676#M145323</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-28T06:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Filter context in dax with relationship clarify</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3730166#M145348</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = CALCULATE(DISTINCTCOUNT(User[Name]),CROSSFILTER(Sales[ID_user],User[ID_user],Both))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 09:33:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3730166#M145348</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-28T09:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Filter context in dax with relationship clarify</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3730604#M145383</link>
      <description>&lt;P&gt;I think you can figure it out yourself. Learn about star schema, and how to use TREATAS.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 12:38:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3730604#M145383</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-28T12:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Filter context in dax with relationship clarify</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3731819#M145429</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;as I mentioned, I am learning and trying to understand logic of filter context with directions, trust me if I understand why is that I will not ask for help and where else to ask for help than forum? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; so if you can explain me in high level, why cannot use solution one, even when data are match via Fact table I will really apreciate it (because I am trying to finding proper explanation for that) and unfortunatelly there is no one in my area who can give me explanation for that (btw still continue to explore blog in sqlbi.com etc..) so if you know explanation it will really help me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;thank you&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 23:13:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3731819#M145429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-28T23:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Filter context in dax with relationship clarify</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3731826#M145430</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;great, thanks for DAX !!!&amp;nbsp;&lt;BR /&gt;may I ask you why is not working solution 1) there is data relation (fact table) where data can be meet and calculated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 23:16:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3731826#M145430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-28T23:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Filter context in dax with relationship clarify</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3731839#M145431</link>
      <description>&lt;P&gt;Here's the answer to question 1, both with implicit measures (in the matrix) and explicit measures (in the table).&amp;nbsp; Note that this is the simplest implementation and it won't tell you which users were NOT in a city. for that you need to use the outer tables.&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;</description>
      <pubDate>Wed, 28 Feb 2024 23:26:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3731839#M145431</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-28T23:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Filter context in dax with relationship clarify</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3731969#M145445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding your formula `User per City = CALCULATE(COUNT(User[ID_user]),Location[ID_location])`**:&lt;/P&gt;
&lt;P&gt;The reason this formula does not produce the expected result is due to how the `CALCULATE` function works in conjunction with the `COUNT` function. The `CALCULATE` function changes the context in which the data is evaluated, and it expects a filter expression as its second argument. However, `Location[ID_location]` as used here does not serve as a filter expression but rather as a column reference, which is why it doesn't work as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more details, please refer:&amp;nbsp;&lt;A href="https://dax.guide/calculate/" target="_blank"&gt;CALCULATE – DAX Guide&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 01:39:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-in-dax-with-relationship-clarify/m-p/3731969#M145445</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-29T01:39:04Z</dc:date>
    </item>
  </channel>
</rss>

