<?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: Same result with or without RELATEDTABLE in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-result-with-or-without-RELATEDTABLE/m-p/1055482#M14540</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;If you are creating Measure then the result would be the same, however, it would differ when creating a Column, in such scenario RELATEDTABLE or CALCULATE is necessary to preform context transition.&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/understanding-context-transition/" target="_blank" rel="noopener"&gt;https://www.sqlbi.com/articles/understanding-context-transition/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accepting it as the solution&lt;/I&gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" target="_blank" rel="noopener"&gt; LinkedIn &lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Apr 2020 06:51:18 GMT</pubDate>
    <dc:creator>Mariusz</dc:creator>
    <dc:date>2020-04-29T06:51:18Z</dc:date>
    <item>
      <title>Same result with or without RELATEDTABLE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-result-with-or-without-RELATEDTABLE/m-p/1055256#M14537</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am referring to the RELATEDTABLE example in&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dax/relatedtable-function-dax" target="_blank"&gt;https://docs.microsoft.com/en-us/dax/relatedtable-function-dax&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Internet Sales = &lt;/SPAN&gt;&lt;SPAN class="hljs-built_in"&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN class="hljs-built_in"&gt;RELATEDTABLE&lt;/SPAN&gt;&lt;SPAN&gt;('InternetSales_USD') , [SalesAmount_USD])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Since the 'Product Category' table is linked to 'InternetSales_USD' table in a relationship (1 to many), I found that the following DAX would return the same result as the above:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Internet Sales = &lt;SPAN class="hljs-built_in"&gt;SUM&lt;/SPAN&gt;( 'InternetSales_USD' [SalesAmount_USD])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What is the point of having RELATEDTABLE when the same result could be obtained without it? I know that Tableau does not require explicit command such as RELATEDTABLE to retrieve data from another joined table. You can simply define the relationship (with correct cardinality) and the program would pull the related data for you without any problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 05:23:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-result-with-or-without-RELATEDTABLE/m-p/1055256#M14537</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-29T05:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Same result with or without RELATEDTABLE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-result-with-or-without-RELATEDTABLE/m-p/1055482#M14540</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;If you are creating Measure then the result would be the same, however, it would differ when creating a Column, in such scenario RELATEDTABLE or CALCULATE is necessary to preform context transition.&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/understanding-context-transition/" target="_blank" rel="noopener"&gt;https://www.sqlbi.com/articles/understanding-context-transition/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accepting it as the solution&lt;/I&gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" target="_blank" rel="noopener"&gt; LinkedIn &lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 06:51:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-result-with-or-without-RELATEDTABLE/m-p/1055482#M14540</guid>
      <dc:creator>Mariusz</dc:creator>
      <dc:date>2020-04-29T06:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Same result with or without RELATEDTABLE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-result-with-or-without-RELATEDTABLE/m-p/1055500#M14542</link>
      <description>&lt;P&gt;Thank you, Mariusz. Could you explain why the result is the same if the following formula is used to create a measure and it differs for a new column?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Internet Sales =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="hljs-built_in"&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;( 'InternetSales_USD' [SalesAmount_USD])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am guessing that:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;for a measure, the formula is dynamic enough so that it is responsive to visual's context, i.e. it aggregates sales for each product category (each row)&lt;/LI&gt;&lt;LI&gt;For a column, the formula does not take into account what attributes are present in the visual, and hence blindly aggregating everything from the&amp;nbsp;&lt;SPAN&gt;InternetSales_USD table.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Am I right?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 06:59:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-result-with-or-without-RELATEDTABLE/m-p/1055500#M14542</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-29T06:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Same result with or without RELATEDTABLE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-result-with-or-without-RELATEDTABLE/m-p/1055583#M14543</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;Measures will implicitly apply a CALCULATE around every statement, so if you create a Measure&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = SUM( sales[Sales Amt] )&lt;/LI-CODE&gt;
&lt;P&gt;in reality, this will be&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = CALCULATE( SUM( sales[Sales Amt] ) )&lt;/LI-CODE&gt;
&lt;P&gt;and CALCULATE performs context transition so RELATEDTABLE is not necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please read the link that you have posted explaining RELATEDTABLE and the one that I have and you should be able to understand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accepting it as the solution&lt;/I&gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" target="_blank"&gt; LinkedIn &lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 07:25:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-result-with-or-without-RELATEDTABLE/m-p/1055583#M14543</guid>
      <dc:creator>Mariusz</dc:creator>
      <dc:date>2020-04-29T07:25:22Z</dc:date>
    </item>
  </channel>
</rss>

