<?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: Xlookup with not exact values in power bi in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Xlookup-with-not-exact-values-in-power-bi/m-p/2760969#M85580</link>
    <description>&lt;P&gt;Hi Yadong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible to somhow do this when the date and time is not matching exactly in the 2 tables?&lt;/P&gt;&lt;P&gt;in youre example:&lt;/P&gt;&lt;P&gt;I would like to make table 2 check the date in table 1 and if it´s not exactly matching then take the value from the closest older date and use that value instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards LM&lt;/P&gt;</description>
    <pubDate>Mon, 12 Sep 2022 06:13:52 GMT</pubDate>
    <dc:creator>LiMa92</dc:creator>
    <dc:date>2022-09-12T06:13:52Z</dc:date>
    <item>
      <title>Xlookup with not exact values in power bi</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Xlookup-with-not-exact-values-in-power-bi/m-p/2737693#M83993</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´ve got a problem in power bi that i´ve been unable to find an answer to or solve yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what we have is one excel file and a table from a SQL server with 1 table in each that I have imported in Power BI&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first table have a column with a unique ID&amp;nbsp; and a column with unique date and time.&lt;/P&gt;&lt;P&gt;each rows represent a product with manufacturing data for that specific product.&lt;/P&gt;&lt;P&gt;Table looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Product ID&amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; Completed time&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2022-08-31 06:00&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2022-08-31 06:02&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2022-08-31 06:05&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;P&gt;In the Second table we have a list of when a specific parameter is changed&lt;/P&gt;&lt;P&gt;in this table we have a column for date and time and a column with the changed value.&lt;/P&gt;&lt;P&gt;looking like this:&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;What i want to do is to add a column to the first table and put the changed value from the Second table and put that for each unique product that is produced after the changed parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the table should look something like this like this:&lt;/P&gt;&lt;P&gt;Product ID&amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; Completed time&amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; parameter from second table&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2022-08-31 06:00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,85&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2022-08-31 06:02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,85&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2022-08-31 06:05&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,85&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Excel I would use the Xlookup function to get this to work:&amp;nbsp;=XLOOKUP(I2;$A$2:$A$30;$B$2:$B$30;;-1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In excel it would look like this:&lt;/P&gt;&lt;P&gt;Table with parameter change:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table with unique products and Xlookup value&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to do this directly in Power Bi so we don't get another excel table that we need to keep updated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 12:12:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Xlookup-with-not-exact-values-in-power-bi/m-p/2737693#M83993</guid>
      <dc:creator>LiMa92</dc:creator>
      <dc:date>2022-08-31T12:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Xlookup with not exact values in power bi</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Xlookup-with-not-exact-values-in-power-bi/m-p/2742822#M84353</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="432180" data-lia-user-login="LiMa92" class="lia-mention lia-mention-user"&gt;LiMa92&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is table1:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is table2:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please create a new column in table2:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = LOOKUPVALUE('table1'[value],'table1'[Date],'table2'[Date])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I misunderstood your needs, please contact us in time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Yadong Fang&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 08:22:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Xlookup-with-not-exact-values-in-power-bi/m-p/2742822#M84353</guid>
      <dc:creator>v-yadongf-msft</dc:creator>
      <dc:date>2022-09-02T08:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Xlookup with not exact values in power bi</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Xlookup-with-not-exact-values-in-power-bi/m-p/2760969#M85580</link>
      <description>&lt;P&gt;Hi Yadong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible to somhow do this when the date and time is not matching exactly in the 2 tables?&lt;/P&gt;&lt;P&gt;in youre example:&lt;/P&gt;&lt;P&gt;I would like to make table 2 check the date in table 1 and if it´s not exactly matching then take the value from the closest older date and use that value instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards LM&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 06:13:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Xlookup-with-not-exact-values-in-power-bi/m-p/2760969#M85580</guid>
      <dc:creator>LiMa92</dc:creator>
      <dc:date>2022-09-12T06:13:52Z</dc:date>
    </item>
  </channel>
</rss>

