<?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: Unable to pass a variable using LOOKUPVALUE in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unable-to-pass-a-variable-using-LOOKUPVALUE/m-p/1260779#M20974</link>
    <description>Are you trying to use LOOKUPVALUE on the dimension table and the values are on the many side of the relationship? If yes, then you should use an Iterator like FILTER &amp;amp; RELATEDTABLE to get a list of all the values that are related to the current row in the table.</description>
    <pubDate>Thu, 30 Jul 2020 04:09:44 GMT</pubDate>
    <dc:creator>AntrikshSharma</dc:creator>
    <dc:date>2020-07-30T04:09:44Z</dc:date>
    <item>
      <title>Unable to pass a variable using LOOKUPVALUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unable-to-pass-a-variable-using-LOOKUPVALUE/m-p/1260309#M20963</link>
      <description>&lt;P&gt;I'm currently trying to pull a value from a different row in a table using the LOOKUPVALUE command but I'm encountering a problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Landmark = 
VAR trailerid = 'Table'[Trailer ID]
RETURN
LOOKUPVALUE('Table'[Landmark], 'Table'[Index], 'Table'[Index Prior],'Table'[Trailer ID], trailerid)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Above is the code I've been trying to use but it doesnt work in its current state and I get the error "A table of multiple values was supplied where a single value was expected."&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I format like so:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Landmark Prior = 
LOOKUPVALUE('Table'[Landmark], 'Table'[Index], 'Table'[Index Prior],'Table'[Trailer ID], "8543")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above code works properly when formatted manually for the trailer id "8543".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a particular reason why trying to pass a variable through will not work on this code?&amp;nbsp; &amp;nbsp;I can provide more context if necessary, I'm just hoping I did something stupid thats easy to fix at first glance from somebody smarter than me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 21:54:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unable-to-pass-a-variable-using-LOOKUPVALUE/m-p/1260309#M20963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-29T21:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to pass a variable using LOOKUPVALUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unable-to-pass-a-variable-using-LOOKUPVALUE/m-p/1260511#M20969</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Try&lt;/P&gt;
&lt;P&gt;minx(filter('Table','Table'[Index] = earlier( 'Table'[Index Prior]) &amp;amp;&amp;amp; 'Table'[Trailer ID] = "8543"),'Table'[Landmark])&lt;/P&gt;
&lt;P&gt;Or&lt;/P&gt;
&lt;P&gt;minx(filter('Table','Table'[Index] = earlier( 'Table'[Index]) &amp;amp;&amp;amp; 'Table'[Trailer ID] = "8543"),'Table'[Landmark])&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 01:48:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unable-to-pass-a-variable-using-LOOKUPVALUE/m-p/1260511#M20969</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-07-30T01:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to pass a variable using LOOKUPVALUE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unable-to-pass-a-variable-using-LOOKUPVALUE/m-p/1260779#M20974</link>
      <description>Are you trying to use LOOKUPVALUE on the dimension table and the values are on the many side of the relationship? If yes, then you should use an Iterator like FILTER &amp;amp; RELATEDTABLE to get a list of all the values that are related to the current row in the table.</description>
      <pubDate>Thu, 30 Jul 2020 04:09:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Unable-to-pass-a-variable-using-LOOKUPVALUE/m-p/1260779#M20974</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-07-30T04:09:44Z</dc:date>
    </item>
  </channel>
</rss>

