<?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: IF Statement between Two Tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-between-Two-Tables/m-p/2333012#M58672</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="357892" data-lia-user-login="Kmcdonald" class="lia-mention lia-mention-user"&gt;Kmcdonald&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;
&lt;P&gt;You could create a column as follows:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;Column = 
var _1=[SO Number]
return
MAXX(
CALCULATETABLE(
    VALUES('Freight'[Actual Pickup Date]),
    CONTAINSSTRING('Freight'[Sender References],_1))
,[Actual Pickup Date])&lt;/LI-CODE&gt;
&lt;P&gt;The final output is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Or create a measure as follows:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;Measure = 
MAXX(
   CALCULATETABLE(
    VALUES('Freight'[Actual Pickup Date]),
     CONTAINSSTRING('Freight'[Sender References],MAX('MYOB'[SO Number]))),[Actual Pickup Date])&lt;/LI-CODE&gt;
&lt;P&gt;The final output is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team_ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps,&lt;/EM&gt;&lt;/STRONG&gt; then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Feb 2022 09:46:09 GMT</pubDate>
    <dc:creator>v-yalanwu-msft</dc:creator>
    <dc:date>2022-02-11T09:46:09Z</dc:date>
    <item>
      <title>IF Statement between Two Tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-between-Two-Tables/m-p/2326565#M58286</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got two tables, one is my transaction in MYOB and the other freight pick up details.&lt;/P&gt;&lt;P&gt;The problem I've got is that, my freight sometimes has more than on order in the consignment and I need to work out what has left but not been invoiced yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what I am trying to do is look up in my MYOB query, if the "SO Number" field from the MYOB query is contained in the "Sender References" field of the freight table, to pull the "Actual Pickup Date" column into my MYOB query as a new column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried contain, search, find, lookupvalue functions and haven't found a solution yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me find a solution to this one please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MYOB Table (called "MYOB - Open Orders" in my query):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Freight Table (called "General Freight - Daily Freight" in my query):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 21:50:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-between-Two-Tables/m-p/2326565#M58286</guid>
      <dc:creator>Kmcdonald</dc:creator>
      <dc:date>2022-02-08T21:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement between Two Tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-between-Two-Tables/m-p/2327075#M58310</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="357892" data-lia-user-login="Kmcdonald" class="lia-mention lia-mention-user"&gt;Kmcdonald&lt;/a&gt; , You can create a new column like in the transaction &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;maxx(filter(MYOB , MYOB [sender reference] = transaction[sender reference] &amp;amp;&amp;amp; MYOB [SO Number] = transaction[SO Number] ) , MYOB[Actual Pickup Date])&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 03:33:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-between-Two-Tables/m-p/2327075#M58310</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-02-09T03:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement between Two Tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-between-Two-Tables/m-p/2333012#M58672</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="357892" data-lia-user-login="Kmcdonald" class="lia-mention lia-mention-user"&gt;Kmcdonald&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;
&lt;P&gt;You could create a column as follows:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;Column = 
var _1=[SO Number]
return
MAXX(
CALCULATETABLE(
    VALUES('Freight'[Actual Pickup Date]),
    CONTAINSSTRING('Freight'[Sender References],_1))
,[Actual Pickup Date])&lt;/LI-CODE&gt;
&lt;P&gt;The final output is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Or create a measure as follows:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;Measure = 
MAXX(
   CALCULATETABLE(
    VALUES('Freight'[Actual Pickup Date]),
     CONTAINSSTRING('Freight'[Sender References],MAX('MYOB'[SO Number]))),[Actual Pickup Date])&lt;/LI-CODE&gt;
&lt;P&gt;The final output is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team_ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps,&lt;/EM&gt;&lt;/STRONG&gt; then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 09:46:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-between-Two-Tables/m-p/2333012#M58672</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2022-02-11T09:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement between Two Tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-between-Two-Tables/m-p/2335492#M58824</link>
      <description>&lt;P&gt;Thanks guys &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Appreciate your help and got the result I needed off your suggestions.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 23:24:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Statement-between-Two-Tables/m-p/2335492#M58824</guid>
      <dc:creator>Kmcdonald</dc:creator>
      <dc:date>2022-02-13T23:24:39Z</dc:date>
    </item>
  </channel>
</rss>

