<?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: RELATED does not work despite one to one relationship? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1920340#M41630</link>
    <description>&lt;P&gt;This is indeed an important distinction. I'd tweak my second example above to give something I think is simpler to read than your EXCEPT version (though the logic is equivalent):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum Amount EXCEPT A =
VAR IDs_A =
    CALCULATETABLE ( VALUES ( 'Filter Table'[ID] ), 'Filter Table'[ID] = "A" )
RETURN
    CALCULATE (
        SUM ( 'Table'[Amount] ),
        FILTER ( VALUES ( 'Table'[ID] ), NOT ( 'Table'[ID] IN IDs_A ) )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2021 15:18:01 GMT</pubDate>
    <dc:creator>AlexisOlson</dc:creator>
    <dc:date>2021-06-24T15:18:01Z</dc:date>
    <item>
      <title>RELATED does not work despite one to one relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1915171#M41444</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am trying to implement a filter from two tables with AND condition to Invoiced Amount:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Retail Invoiced Amount = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;[Invoiced Amount EUR], &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;'Legal Unit Filter'[Procurement KPI]="Retail KPI", &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;FILTER(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;'Business Unit',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;RELATED('Business Unit Filter'[Procurement G&amp;amp;SF.H&amp;amp;T KPI ])&amp;lt;&amp;gt;"Yes"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But Power BI gives me an error:&lt;BR /&gt;The column 'Business Unit Filter[Procurement G&amp;amp;SF.H&amp;amp;T KPI ]' either doesn't exist or doesn't have a relationship to any table available in the current context.&lt;BR /&gt;&lt;BR /&gt;This is strange since Business Unit and Business Unit Filter tables have a One-to-one relationship:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Business Unit then has a One-to-Many relationship with the Invoice table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can be the problem here? When I try the same setup in a test file with same set of table relationships there is no error and Invoice Amount is calculated correct. I am working in a composit model could that effect how RELATED works?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 15:23:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1915171#M41444</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-22T15:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: RELATED does not work despite one to one relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1915221#M41448</link>
      <description>&lt;P&gt;When you are filtering the table 'Business Unit', you don't need to use RELATED to access the columns of that same table. That doesn't make sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What happens if you remove RELATED on that column?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 15:38:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1915221#M41448</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-06-22T15:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: RELATED does not work despite one to one relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1917199#M41515</link>
      <description>&lt;P&gt;Thank you for the reply. Note that the&amp;nbsp;'Business Unit Filter'[Procurement G&amp;amp;SF.H&amp;amp;T KPI ]&amp;nbsp;column is not in the 'Business Unit' table but the 'Business Unit &lt;STRONG&gt;Filter&lt;/STRONG&gt;' table thus the use of RELATED.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If I remove the RELATED I get an error saying a single value for &lt;SPAN&gt;'Business Unit Filter'[Procurement G&amp;amp;SF.H&amp;amp;T KPI]&amp;nbsp;&lt;/SPAN&gt;cannot be determined which is strange since the connection is One-To-One a single value in the columns &lt;SPAN&gt;'Business Unit Filter'[Procurement G&amp;amp;SF.H&amp;amp;T KPI]&amp;nbsp;&lt;/SPAN&gt;should be available for each row in 'Business Unit'?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 10:19:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1917199#M41515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-23T10:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: RELATED does not work despite one to one relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1917718#M41540</link>
      <description>&lt;P&gt;Ah, sorry. I did miss that Filter part of the name.&lt;/P&gt;&lt;P&gt;I think the issue may indeed be that the &lt;A href="https://www.sqlbi.com/articles/strong-and-weak-relationships-in-power-bi/" target="_self"&gt;relationship is weak&lt;/A&gt;&amp;nbsp;(a.k.a a &lt;A href="https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand#limited-relationships" target="_self"&gt;limited relationship&lt;/A&gt;) since it's a cross-island relationship between different data storage types. In the documentation for &lt;A href="https://docs.microsoft.com/en-us/dax/related-function-dax" target="_self"&gt;RELATED&lt;/A&gt;, it explicitly says&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The RELATED function cannot be used to fetch a column across a limited relationship.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 23 Jun 2021 14:34:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1917718#M41540</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-06-23T14:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: RELATED does not work despite one to one relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1917839#M41547</link>
      <description>&lt;P&gt;Yes that is it! The model is Composite with 'Legal Unit Filter' table from different source than 'Legal Unit' table thus making the relationship weak according to the documentaiton:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A model relationship is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;limited&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;when there's no guaranteed "one" side. It can be the case for two reasons:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The relationship uses a Many-to-many cardinality type (even if one or both columns contain unique values)&lt;/LI&gt;&lt;LI&gt;The relationship is cross source group (which can only ever be the case for Composite models)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 15:10:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1917839#M41547</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-23T15:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: RELATED does not work despite one to one relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1917849#M41549</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I was able to solve this by using EXCEPT. If anyone knows a better way to get around this weak/limite relationship in Composit models please let me know!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#RetailInvoicedAmount = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;[Invoiced Amount EUR], &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;'Legal Unit Filter'[Procurement KPI]="Retail KPI", &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;EXCEPT(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;SELECTCOLUMNS(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;'Business Unit',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;"ID", &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;'Business Unit'[Business Unit ID]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;SELECTCOLUMNS(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;FILTER(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-120px"&gt;&lt;SPAN&gt;'Business Unit Filter',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-120px"&gt;&lt;SPAN&gt;'Business Unit Filter'[Procurement G&amp;amp;SF.H&amp;amp;T KPI ]="Yes"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;"ID",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;'Business Unit Filter'[Business Unit ID]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Jun 2021 15:12:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1917849#M41549</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-23T15:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: RELATED does not work despite one to one relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1917903#M41553</link>
      <description>&lt;P&gt;Does this simpler version work?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Retail Invoiced Amount =
CALCULATE (
    [Invoiced Amount EUR],
    'Legal Unit Filter'[Procurement KPI] = "Retail KPI",
    FILTER (
        'Business Unit Filter',
        'Business Unit Filter'[Procurement G&amp;amp;SF.H&amp;amp;T KPI ] &amp;lt;&amp;gt; "Yes"
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not, then I'd probably try something along these lines:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Retail Invoiced Amount =
VAR BUF_Ids =
    CALCULATETABLE (
        VALUES ( 'Business Unit Filter'[Business Unit ID] ),
        'Business Unit Filter'[Procurement G&amp;amp;SF.H&amp;amp;T KPI ] &amp;lt;&amp;gt; "Yes"
    )
RETURN
    CALCULATE (
        [Invoiced Amount EUR],
        'Legal Unit Filter'[Procurement KPI] = "Retail KPI",
        FILTER (
            VALUES ( 'Business Unit'[Business Unit ID] ),
            'Business Unit'[Business Unit ID] IN BUF_Ids
        )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Jun 2021 15:27:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1917903#M41553</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-06-23T15:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: RELATED does not work despite one to one relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1919705#M41606</link>
      <description>&lt;P&gt;Thank you for taking the time to help me understand this. And yes the first one gives the result I need in a more straightforward way &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;&lt;P&gt;But I am worried the FILTER solution could inadvertly remove business units from the Amount if they are not present in the Business Unit Filter table. I have illustrated this in an simpler example below with both a FILTER solution and an EXCEPT solution. Perhaps the FILTER behaivor changes when the connection is Limited/Weak? Edit: In the example below adding zero rows to create Many-To-Many did not change the result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The correct amount in this case should be 20.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Edit again: EXCEPT should be = A not &amp;lt;&amp;gt;A.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 10:25:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1919705#M41606</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-24T10:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: RELATED does not work despite one to one relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1920340#M41630</link>
      <description>&lt;P&gt;This is indeed an important distinction. I'd tweak my second example above to give something I think is simpler to read than your EXCEPT version (though the logic is equivalent):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum Amount EXCEPT A =
VAR IDs_A =
    CALCULATETABLE ( VALUES ( 'Filter Table'[ID] ), 'Filter Table'[ID] = "A" )
RETURN
    CALCULATE (
        SUM ( 'Table'[Amount] ),
        FILTER ( VALUES ( 'Table'[ID] ), NOT ( 'Table'[ID] IN IDs_A ) )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 15:18:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1920340#M41630</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-06-24T15:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: RELATED does not work despite one to one relationship?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1922370#M41676</link>
      <description>&lt;P&gt;Yes that is a much more elegant solution that covers the possibility of keys missing in the filter table! Thank you very much!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 11:15:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RELATED-does-not-work-despite-one-to-one-relationship/m-p/1922370#M41676</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-25T11:15:45Z</dc:date>
    </item>
  </channel>
</rss>

