<?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 Formular ( 2 Tables) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Formular-2-Tables/m-p/774257#M3836</link>
    <description>With the info you've given it's not possible to tell you what to do. We have to know the structure of your model first of all...&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D.</description>
    <pubDate>Fri, 23 Aug 2019 12:13:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-23T12:13:41Z</dc:date>
    <item>
      <title>IF Formular ( 2 Tables)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Formular-2-Tables/m-p/774248#M3833</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually I am starting to create my first Power BI Reports and therefore I need an if formular.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately it is not working as I can only select the data from one of the two tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me shortly explain what I want to do.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In both tables is one column with a time which I need for my formular as I want to compare both times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created the formular already in excel and there it is working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If(Table1[Time1]-Table2[Time2]&amp;gt;=0;Text(Time1[Time1]-Table2[Time2];"[hh]:mm");TEXT(-(Table1[Time1]-Table2[Time2]);"-[hh]:mm"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formular should compare the both times and show me the difference.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the formular text because otherwise Excel can not create "negative time"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formular is working in Power BI as well but only if the two times are in the same table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My only question is how I can create this formular in PowerBI&amp;nbsp; by using different tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance and best regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Niclas&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 12:09:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Formular-2-Tables/m-p/774248#M3833</guid>
      <dc:creator>SN1900</dc:creator>
      <dc:date>2019-08-23T12:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: IF Formular ( 2 Tables)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Formular-2-Tables/m-p/774257#M3836</link>
      <description>With the info you've given it's not possible to tell you what to do. We have to know the structure of your model first of all...&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D.</description>
      <pubDate>Fri, 23 Aug 2019 12:13:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Formular-2-Tables/m-p/774257#M3836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-23T12:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: IF Formular ( 2 Tables)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Formular-2-Tables/m-p/774302#M3839</link>
      <description>&lt;P&gt;Hi darlove,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please find attached some screenshoots&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what I wanted to do is to compare the event date with the delivery appointment time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The relationship for both tables is the Shipment ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Shipment ID and the Delivery Appointment Time is coming from the table OTM Shipment analysis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Event time is coming from the OTM Event analysis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the formular with time values from one table and then it is working.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(IF(OTM_EventStatus_Analysis[EVENT DATE TIME UTC]-OTM_EventStatus_Analysis[EVENT DATE TIME]&amp;gt;=0;FORMAT(OTM_EventStatus_Analysis[EVENT DATE TIME UTC]-OTM_EventStatus_Analysis[EVENT DATE TIME];"hh:mm:ss");FORMAT(-(OTM_EventStatus_Analysis[EVENT DATE TIME UTC]-OTM_EventStatus_Analysis[EVENT DATE TIME]);"-hh:mm:ss")))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But now I want to replace the "Event date time utc "with the "delivery Appointment time" but this is not working as the Delivery Appointment time is in another table.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 12:47:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-Formular-2-Tables/m-p/774302#M3839</guid>
      <dc:creator>SN1900</dc:creator>
      <dc:date>2019-08-23T12:47:33Z</dc:date>
    </item>
  </channel>
</rss>

