<?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 Calculated Column from two tables related to one another with a 3'rd table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-from-two-tables-related-to-one-another-with-a/m-p/3051945#M105158</link>
    <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have 3 tables: Query1 at Product and Invoice Level; Stock_KLG at Product Level; and DimProduct at Product Level&lt;/P&gt;&lt;P&gt;Query1 has an old Product code and Stock_KLG a new Product code. They are connected to one another by a mapping table DimProducts.&lt;/P&gt;&lt;P&gt;I want to create a calculated column [Stock_KLG]Quantity * Average( [Query1]Unit_Cost )&lt;/P&gt;&lt;P&gt;I tried with related and allexcept, but because of a 3'rd table it doesn't work.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jan 2023 07:30:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-31T07:30:29Z</dc:date>
    <item>
      <title>Calculated Column from two tables related to one another with a 3'rd table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-from-two-tables-related-to-one-another-with-a/m-p/3051945#M105158</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have 3 tables: Query1 at Product and Invoice Level; Stock_KLG at Product Level; and DimProduct at Product Level&lt;/P&gt;&lt;P&gt;Query1 has an old Product code and Stock_KLG a new Product code. They are connected to one another by a mapping table DimProducts.&lt;/P&gt;&lt;P&gt;I want to create a calculated column [Stock_KLG]Quantity * Average( [Query1]Unit_Cost )&lt;/P&gt;&lt;P&gt;I tried with related and allexcept, but because of a 3'rd table it doesn't work.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 07:30:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-from-two-tables-related-to-one-another-with-a/m-p/3051945#M105158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-31T07:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column from two tables related to one another with a 3'rd table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-from-two-tables-related-to-one-another-with-a/m-p/3051963#M105160</link>
      <description>&lt;P&gt;which is the 3rd table?&lt;/P&gt;
&lt;P&gt;if you are adding a calculated column in DimProducts, can try this code&lt;/P&gt;
&lt;P&gt;NewColumn=SUMX(RELATEDTABLE(&lt;SPAN&gt;Stock_KLG,Stock_KLG]Quantity)*AVERAGEX(RELATEDTABLE(Query1,Query1[Unit_Cost])&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 07:41:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-from-two-tables-related-to-one-another-with-a/m-p/3051963#M105160</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2023-01-31T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column from two tables related to one another with a 3'rd table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-from-two-tables-related-to-one-another-with-a/m-p/3051998#M105167</link>
      <description>&lt;P&gt;Great. Looks like it works in this form:&lt;/P&gt;&lt;P&gt;[Stock_KLG]Quantity *&amp;nbsp;&lt;SPAN&gt;AVERAGEX(RELATEDTABLE(Query1,Query1[Unit_Cost])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 08:05:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-from-two-tables-related-to-one-another-with-a/m-p/3051998#M105167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-31T08:05:12Z</dc:date>
    </item>
  </channel>
</rss>

