<?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 Using two related columns within sumx causes error in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-two-related-columns-within-sumx-causes-error/m-p/3221795#M117769</link>
    <description>&lt;P&gt;I have a sumx function that first gets a value&lt;BR /&gt;&lt;BR /&gt;if fact[date1] &amp;gt; related(table2'[date2]), 1, 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then use the filter function after sumx to filter by the fact table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upto here the code runs fine. its when I try to filter by another 3rd table it causes an error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RELATED('table3[column1]) &amp;lt;&amp;gt; "Value"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This causes an error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FULL CODE BELOW:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE (
    SUMX (
        'FACT TABLE',
        IF ( 
            [date1] &amp;gt; RELATED('table2'[date2]),
                1,
                0
        )
    ),
    'FACT TABLE'[Column2] &amp;lt;&amp;gt; "VALUE"
    RELATED('table3'[column3]) &amp;lt;&amp;gt; "VALUE"
)&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 05 May 2023 09:51:15 GMT</pubDate>
    <dc:creator>akhaliq7</dc:creator>
    <dc:date>2023-05-05T09:51:15Z</dc:date>
    <item>
      <title>Using two related columns within sumx causes error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-two-related-columns-within-sumx-causes-error/m-p/3221795#M117769</link>
      <description>&lt;P&gt;I have a sumx function that first gets a value&lt;BR /&gt;&lt;BR /&gt;if fact[date1] &amp;gt; related(table2'[date2]), 1, 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then use the filter function after sumx to filter by the fact table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upto here the code runs fine. its when I try to filter by another 3rd table it causes an error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RELATED('table3[column1]) &amp;lt;&amp;gt; "Value"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This causes an error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FULL CODE BELOW:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE (
    SUMX (
        'FACT TABLE',
        IF ( 
            [date1] &amp;gt; RELATED('table2'[date2]),
                1,
                0
        )
    ),
    'FACT TABLE'[Column2] &amp;lt;&amp;gt; "VALUE"
    RELATED('table3'[column3]) &amp;lt;&amp;gt; "VALUE"
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 May 2023 09:51:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-two-related-columns-within-sumx-causes-error/m-p/3221795#M117769</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-05-05T09:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using two related columns within sumx causes error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-two-related-columns-within-sumx-causes-error/m-p/3221811#M117772</link>
      <description>&lt;P&gt;I don't think you need RELATED for that, you can simply use 'table3'[column3] &amp;lt;&amp;gt; "value"&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 09:58:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-two-related-columns-within-sumx-causes-error/m-p/3221811#M117772</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-05T09:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using two related columns within sumx causes error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-two-related-columns-within-sumx-causes-error/m-p/3221889#M117774</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307422" data-lia-user-login="akhaliq7" class="lia-mention lia-mention-user"&gt;akhaliq7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;=&lt;BR /&gt;COUNTROWS (&lt;BR /&gt;FILTER (&lt;BR /&gt;'FACT TABLE',&lt;BR /&gt;'FACT TABLE'[date1] &amp;gt; RELATED ( 'table2'[date2] )&lt;BR /&gt;&amp;amp;&amp;amp; 'FACT TABLE'[Column2] &amp;lt;&amp;gt; "VALUE"&lt;BR /&gt;&amp;amp;&amp;amp; RELATED ( 'table3'[column3] ) &amp;lt;&amp;gt; "VALUE"&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 10:41:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-two-related-columns-within-sumx-causes-error/m-p/3221889#M117774</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-05T10:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using two related columns within sumx causes error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-two-related-columns-within-sumx-causes-error/m-p/3221933#M117782</link>
      <description>&lt;P&gt;ok thanks for that never knew if its in the filter function you don't need to use related. the filter function must just automatically detect the relationship. anyways thanks for that&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 11:18:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-two-related-columns-within-sumx-causes-error/m-p/3221933#M117782</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-05-05T11:18:52Z</dc:date>
    </item>
  </channel>
</rss>

