<?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 Joining Two Tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Joining-Two-Tables/m-p/3554140#M136768</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have the two following tables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Task Table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Project Table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the task table, I want to have the last column (Status). It is not originally there, it's part of project table. I want to do a join between the two tables based on Projectid, but I haven't been successful so far with DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone guide me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Nov 2023 12:24:08 GMT</pubDate>
    <dc:creator>Babakhsn</dc:creator>
    <dc:date>2023-11-27T12:24:08Z</dc:date>
    <item>
      <title>Joining Two Tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Joining-Two-Tables/m-p/3554140#M136768</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have the two following tables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Task Table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Project Table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the task table, I want to have the last column (Status). It is not originally there, it's part of project table. I want to do a join between the two tables based on Projectid, but I haven't been successful so far with DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone guide me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 12:24:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Joining-Two-Tables/m-p/3554140#M136768</guid>
      <dc:creator>Babakhsn</dc:creator>
      <dc:date>2023-11-27T12:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Two Tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Joining-Two-Tables/m-p/3554161#M136771</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="605822" data-lia-user-login="Babakhsn" class="lia-mention lia-mention-user"&gt;Babakhsn&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;In the Table view go on the Task Table(select it on the right side panel), click on new column and write :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;- If a relation exist between the two tables (one to many on the ProjectID ==&amp;gt; Related project ID):&lt;BR /&gt;&lt;STRONG&gt;Status =&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;STRONG&gt; CALCULATE(SELECTEDVALUE(Project_table[Status]))&lt;BR /&gt;-&lt;/STRONG&gt;&lt;/STRONG&gt;else (Meaning we would need to introduce the relationship directly into the dax formula)&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Status = CALCULATE(SELECTEDVALUE(Project_table[Status]),FILTER(Project_table, Project_table[ProjectID] = Task_Table[Related project ID]&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Nov 2023 12:46:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Joining-Two-Tables/m-p/3554161#M136771</guid>
      <dc:creator>philouduv</dc:creator>
      <dc:date>2023-11-27T12:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Two Tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Joining-Two-Tables/m-p/3554179#M136773</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="605822" data-lia-user-login="Babakhsn" class="lia-mention lia-mention-user"&gt;Babakhsn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try to add a calculated column like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Status =
LOOKUPVALUE(
    Project[Status],
    Project[Project],
    Task[Related Project]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Nov 2023 12:51:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Joining-Two-Tables/m-p/3554179#M136773</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-11-27T12:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Two Tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Joining-Two-Tables/m-p/3557706#M136999</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="605822" data-lia-user-login="Babakhsn" class="lia-mention lia-mention-user"&gt;Babakhsn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can try the following methods&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = CALCULATE(MAX('Project Table'[Status]),FILTER('Project Table',[Projectid]=EARLIER('Task Table'[Related Project Id])))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Column 2 = LOOKUPVALUE('Project Table'[Status],'Project Table'[Projectid],[Related Project Id])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is this the result you expect?&lt;/SPAN&gt; &lt;SPAN&gt;Please see the attached document.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;helps, then please consider&amp;nbsp;&lt;EM&gt;Accept it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 02:09:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Joining-Two-Tables/m-p/3557706#M136999</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2023-11-29T02:09:43Z</dc:date>
    </item>
  </channel>
</rss>

