<?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 If multiple relationships are needed to join table A to table B in a calculation? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3090166#M108248</link>
    <description>&lt;P&gt;I have multiple relationships between table A and table B.&lt;/P&gt;&lt;P&gt;'Year', 'Month', 'Week', and 'Line' are columns linked between these 2 tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table A consist of 'Duration', which I need to sum up.&lt;/P&gt;&lt;P&gt;How can I use "USERELATIONSHIP" to use multiple relationship for my calculation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following dax formula, but the visual display an error message:&lt;/P&gt;&lt;P&gt;"Can't display the visual. There are ambiguous paths between table A and table B."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;( 'TableA'[Duration]), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; ('TableA', 'TableA'[Category] = &lt;/SPAN&gt;&lt;SPAN&gt;"Red"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;USERELATIONSHIP&lt;/SPAN&gt;&lt;SPAN&gt;('TableB'[Year], 'TableA'[Year]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; USERELATIONSHIP('TableB'[Month], 'TableA'[Month]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; USERELATIONSHIP('TableB'[Week], 'TableA'[Week]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; USERELATIONSHIP('TableB'[Line], 'TableA'[Line]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 22 Feb 2023 00:49:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-02-22T00:49:00Z</dc:date>
    <item>
      <title>If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3090166#M108248</link>
      <description>&lt;P&gt;I have multiple relationships between table A and table B.&lt;/P&gt;&lt;P&gt;'Year', 'Month', 'Week', and 'Line' are columns linked between these 2 tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table A consist of 'Duration', which I need to sum up.&lt;/P&gt;&lt;P&gt;How can I use "USERELATIONSHIP" to use multiple relationship for my calculation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following dax formula, but the visual display an error message:&lt;/P&gt;&lt;P&gt;"Can't display the visual. There are ambiguous paths between table A and table B."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;( 'TableA'[Duration]), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; ('TableA', 'TableA'[Category] = &lt;/SPAN&gt;&lt;SPAN&gt;"Red"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;USERELATIONSHIP&lt;/SPAN&gt;&lt;SPAN&gt;('TableB'[Year], 'TableA'[Year]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; USERELATIONSHIP('TableB'[Month], 'TableA'[Month]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; USERELATIONSHIP('TableB'[Week], 'TableA'[Week]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; USERELATIONSHIP('TableB'[Line], 'TableA'[Line]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Feb 2023 00:49:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3090166#M108248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-22T00:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3090623#M108254</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Measure1 =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'TableA'[Duration] ),&lt;BR /&gt;FILTER ( 'TableA', 'TableA'[Category] = "Red" ),&lt;BR /&gt;FILTER (&lt;BR /&gt;'TableB',&lt;BR /&gt;'TableB'[Year] = 'TableA'[Year]&lt;BR /&gt;&amp;amp;&amp;amp; 'TableB'[Month] = 'TableA'[Month]&lt;BR /&gt;&amp;amp;&amp;amp; 'TableB'[Week] = 'TableA'[Week]&lt;BR /&gt;),&lt;BR /&gt;USERELATIONSHIP ( 'TableB'[Line], 'TableA'[Line] )&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;Measure1 =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'TableA'[Duration] ),&lt;BR /&gt;FILTER ( 'TableA', 'TableA'[Category] = "Red" ),&lt;BR /&gt;FILTER (&lt;BR /&gt;CALCULATETABLE ( 'TableB', USERELATIONSHIP ( 'TableB'[Line], 'TableA'[Line] ) ),&lt;BR /&gt;'TableB'[Year] = 'TableA'[Year]&lt;BR /&gt;&amp;amp;&amp;amp; 'TableB'[Month] = 'TableA'[Month]&lt;BR /&gt;&amp;amp;&amp;amp; 'TableB'[Week] = 'TableA'[Week]&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 14:49:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3090623#M108254</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-21T14:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3090717#M108258</link>
      <description>&lt;P&gt;Hi &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;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The year, month and week from Table B are actually slicers on the power BI report.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if i use the suggested formulas that you gave, it does not work as the year, month and week are dynamic, based on user's input. (Not pre-defined)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got this error message when i try your suggested formulas:&lt;/P&gt;&lt;P&gt;A single value for column 'Year' in tableA cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can we link TableA[year], [month], [week] to TableB[year],[month], [week] so that the measure can work?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 15:32:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3090717#M108258</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-21T15:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3090831#M108271</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please use&lt;/P&gt;
&lt;P&gt;Measure1 =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'TableA'[Duration] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;'TableA',&lt;BR /&gt;'TableA'[Category] = "Red"&lt;BR /&gt;&amp;amp;&amp;amp; 'TableA'[Year]&lt;BR /&gt;IN VALUES ( 'TableB'[Year] )&lt;BR /&gt;&amp;amp;&amp;amp; 'TableA'[Month]&lt;BR /&gt;IN VALUES ( 'TableB'[Month] )&lt;BR /&gt;&amp;amp;&amp;amp; 'TableA'[Week]&lt;BR /&gt;IN VALUES ( 'TableB'[Week] )&lt;BR /&gt;&amp;amp;&amp;amp; 'TableA'[Line] IN VALUES ( 'TableB'[Line] )&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 16:09:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3090831#M108271</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-21T16:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3091621#M108328</link>
      <description>&lt;P&gt;Thank you so much for your help&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 01:09:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3091621#M108328</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-22T01:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3117577#M110433</link>
      <description>&lt;P&gt;Hi tamerj1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I want to remove the words in orange (just summing up duration), how do I re-write the DAX formula?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Measure1 =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SUM ( 'TableA'[Duration] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FILTER (&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;'TableA',&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;'TableA'[Category] = "Red"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;amp;&amp;amp; 'TableA'[Year]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IN VALUES ( 'TableB'[Year] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;amp;&amp;amp; 'TableA'[Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IN VALUES ( 'TableB'[Month] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;amp;&amp;amp; 'TableA'[Week]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IN VALUES ( 'TableB'[Week] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;amp;&amp;amp; 'TableA'[Line] IN VALUES ( 'TableB'[Line] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 00:07:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3117577#M110433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-08T00:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3118025#M110457</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Not sure if I correctly understand. Do you mean like:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Measure1 =
CALCULATE (
    SUM ( 'TableA'[Duration] ),
    FILTER (
        'TableA',
        'TableA'[Category] &amp;lt;&amp;gt; "Orange"
            &amp;amp;&amp;amp; 'TableA'[Year]
                IN VALUES ( 'TableB'[Year] )
                    &amp;amp;&amp;amp; 'TableA'[Month]
                        IN VALUES ( 'TableB'[Month] )
                            &amp;amp;&amp;amp; 'TableA'[Week]
                                IN VALUES ( 'TableB'[Week] )
                                    &amp;amp;&amp;amp; 'TableA'[Line] IN VALUES ( 'TableB'[Line] )
    )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 08 Mar 2023 06:10:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3118025#M110457</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-08T06:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3160490#M113478</link>
      <description>&lt;P&gt;Hello, what if there is a filter slicer on the report using 'TableB'[Colour] . Is there a way we can write the DAX measure such that it ignores the colour selected on the slicer?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 09:52:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3160490#M113478</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-29T09:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3160580#M113488</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Measure1 =
VAR B =
    CALCULATETABLE ( 'TableB', ALL ( 'TableB'[Color] ) )
VAR BYears =
    SELECTCOLUMNS ( 'TableB', "@Year", 'TableB'[Year] )
VAR BMonths =
    SELECTCOLUMNS ( 'TableB', "@Month", 'TableB'[Month] )
VAR BWeeks =
    SELECTCOLUMNS ( 'TableB', "@Week", 'TableB'[Week] )
VAR BLines =
    SELECTCOLUMNS ( 'TableB', "@Line", 'TableB'[Line] )
RETURN
    CALCULATE (
        SUM ( 'TableA'[Duration] ),
        FILTER (
            'TableA',
            'TableA'[Category] = "Red"
                &amp;amp;&amp;amp; 'TableA'[Year] IN BYears
                &amp;amp;&amp;amp; 'TableA'[Month] IN BMonths
                &amp;amp;&amp;amp; 'TableA'[Week] IN BWeeks
                &amp;amp;&amp;amp; 'TableA'[Line] IN BLines
        )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 29 Mar 2023 10:41:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3160580#M113488</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-29T10:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3162789#M113635</link>
      <description>&lt;DIV class=""&gt;&lt;SPAN&gt;Hi tamerj1,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I tried but it does not work.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Background:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Table A does not have a column on color.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Only Table B has a column on color.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;These 2 tables are linked only by an active relationship between the [Line]. No inactive relationship exists.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Problem:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;When I select 'red' on the filter&amp;nbsp; (Table B[Color]), somehow it will filter the Table A[Duration] too.&amp;nbsp; I use IN VALUES for year, month &amp;amp; week only.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Mar 2023 08:12:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3162789#M113635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-30T08:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3162800#M113636</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;"It does not work" means it is giving wrong results or it is still being filtered by the color slicer?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 08:12:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3162800#M113636</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-30T08:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3162804#M113637</link>
      <description>&lt;P&gt;Sorry for the unclear response. it is still being filtered by the color slicer.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 08:13:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3162804#M113637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-30T08:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3162828#M113640</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You are absolutely right. It was a stupid mistake from my side. Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Measure1 =
VAR B =
    CALCULATETABLE ( 'TableB', ALL ( 'TableB'[Color] ) )
VAR BYears =
    SELECTCOLUMNS ( B, "@Year", 'TableB'[Year] )
VAR BMonths =
    SELECTCOLUMNS ( B, "@Month", 'TableB'[Month] )
VAR BWeeks =
    SELECTCOLUMNS ( B, "@Week", 'TableB'[Week] )
VAR BLines =
    SELECTCOLUMNS ( B, "@Line", 'TableB'[Line] )
RETURN
    CALCULATE (
        SUM ( 'TableA'[Duration] ),
        FILTER (
            'TableA',
            'TableA'[Category] = "Red"
                &amp;amp;&amp;amp; 'TableA'[Year]
                IN BYears
                &amp;amp;&amp;amp; 'TableA'[Month]
                IN BMonths
                &amp;amp;&amp;amp; 'TableA'[Week]
                IN BWeeks
                &amp;amp;&amp;amp; 'TableA'[Line] IN BLines
        )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Mar 2023 08:20:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3162828#M113640</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-30T08:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3165051#M113801</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;tamerj1,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'TableA' does not have a [Color/Category] column.&lt;/P&gt;&lt;P&gt;'TableA' and 'TableB' are linked only by an active relationship between the 'Line' columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E..g If red colour is chosen in the slicer filter 'TableB'[Color],&amp;nbsp;using the formula below gives the filtered result SUM('TableA'[Duration]) which is not what I want. I want the unfiltered result, including all colors.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Measure1 =
VAR B =
    CALCULATETABLE ( 'TableB', ALL ( 'TableB'[Color] ) )
VAR BYears =
    SELECTCOLUMNS ( 'TableB', "@Year", 'TableB'[Year] )
VAR BMonths =
    SELECTCOLUMNS ( 'TableB', "@Month", 'TableB'[Month] )
VAR BWeeks =
    SELECTCOLUMNS ( 'TableB', "@Week", 'TableB'[Week] )

RETURN
    CALCULATE (
        SUM ( 'TableA'[Duration] ),
        FILTER (
            'TableA',
                'TableA'[Year] IN BYears
                &amp;amp;&amp;amp; 'TableA'[Month] IN BMonths
                &amp;amp;&amp;amp; 'TableA'[Week] IN BWeeks
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 06:52:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3165051#M113801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-31T06:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: If multiple relationships are needed to join table A to table B in a calculation?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3165081#M113807</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;It seems you did not notice my previous reply. I had made a mistake in the above code that was correted in the other reply. Here is the corrected code&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Measure1 =
VAR B =
    CALCULATETABLE ( 'TableB', ALL ( 'TableB'[Color] ) )
VAR BYears =
    SELECTCOLUMNS ( B, "@Year", 'TableB'[Year] )
VAR BMonths =
    SELECTCOLUMNS ( B, "@Month", 'TableB'[Month] )
VAR BWeeks =
    SELECTCOLUMNS ( B, "@Week", 'TableB'[Week] )
VAR BLines =
    SELECTCOLUMNS ( B, "@Line", 'TableB'[Line] )
RETURN
    CALCULATE (
        SUM ( 'TableA'[Duration] ),
        FILTER (
            'TableA',
            'TableA'[Category] = "Red"
                &amp;amp;&amp;amp; 'TableA'[Year]
                IN BYears
                &amp;amp;&amp;amp; 'TableA'[Month]
                IN BMonths
                &amp;amp;&amp;amp; 'TableA'[Week]
                IN BWeeks
                &amp;amp;&amp;amp; 'TableA'[Line] IN BLines
        )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 Mar 2023 07:12:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-multiple-relationships-are-needed-to-join-table-A-to-table-B/m-p/3165081#M113807</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-31T07:12:18Z</dc:date>
    </item>
  </channel>
</rss>

