<?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: VLOOKUP with MAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VLOOKUP-with-MAX/m-p/990656#M12293</link>
    <description>&lt;LI-CODE lang="markup"&gt;// Please note I'm not using CALCULATE here
// because if the tblOrder table is big,
// it would be agonizingly slow.
[String] =
var __order = tblOrder[Order]
var __maxSEQ =
	MAXX(
		topn(1,
			filter(
				tblWork,
				tblWork[Order] = __order
			),
			tblWork[SEQ],
			DESC
		),
		tblWork[SEQ]
	)
var __maxState =
	MAXX(
		topn(1,
			filter(
				tblWork,
				tblWork[Order] = __order
				&amp;amp;&amp;amp;
				tblWork[SEQ] = __maxSEQ
			),
			tblWork[State],
			DESC
		),
		tblWork[State]
	)
var __string =
MAXX(
	filter(
		tblWork,
		tblWork[Order] = __order
		&amp;amp;&amp;amp;
		tblWork[SEQ] = __maxSEQ
		&amp;amp;&amp;amp;
		tblWork[State] = __maxState
	),
	tblWork[String]
)
return
	__string
	&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
    <pubDate>Wed, 25 Mar 2020 09:50:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-03-25T09:50:05Z</dc:date>
    <item>
      <title>VLOOKUP with MAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VLOOKUP-with-MAX/m-p/990617#M12291</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;I have two tables:&lt;/P&gt;&lt;P&gt;tblOrder&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Order&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1001&lt;/TD&gt;&lt;TD&gt;01.01.2020&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1002&lt;/TD&gt;&lt;TD&gt;01.01.2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tblWork&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Order&lt;/TD&gt;&lt;TD&gt;SEQ&lt;/TD&gt;&lt;TD&gt;State&lt;/TD&gt;&lt;TD&gt;String&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1001&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1001&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;BBB&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Now I would like to add the first table a calculated column that shows me the String for the row of tblWork where SEQ &amp;amp; State = MAX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would you do that?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 09:29:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VLOOKUP-with-MAX/m-p/990617#M12291</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2020-03-25T09:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: VLOOKUP with MAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VLOOKUP-with-MAX/m-p/990656#M12293</link>
      <description>&lt;LI-CODE lang="markup"&gt;// Please note I'm not using CALCULATE here
// because if the tblOrder table is big,
// it would be agonizingly slow.
[String] =
var __order = tblOrder[Order]
var __maxSEQ =
	MAXX(
		topn(1,
			filter(
				tblWork,
				tblWork[Order] = __order
			),
			tblWork[SEQ],
			DESC
		),
		tblWork[SEQ]
	)
var __maxState =
	MAXX(
		topn(1,
			filter(
				tblWork,
				tblWork[Order] = __order
				&amp;amp;&amp;amp;
				tblWork[SEQ] = __maxSEQ
			),
			tblWork[State],
			DESC
		),
		tblWork[State]
	)
var __string =
MAXX(
	filter(
		tblWork,
		tblWork[Order] = __order
		&amp;amp;&amp;amp;
		tblWork[SEQ] = __maxSEQ
		&amp;amp;&amp;amp;
		tblWork[State] = __maxState
	),
	tblWork[String]
)
return
	__string
	&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 09:50:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VLOOKUP-with-MAX/m-p/990656#M12293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-25T09:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: VLOOKUP with MAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VLOOKUP-with-MAX/m-p/991224#M12315</link>
      <description>&lt;P&gt;Thanks for your approach! Unfortunately, I get the following error:&lt;BR /&gt;Calculation error in measure YXX : A single value for column 'XX' cannot be determined in table 'XX'. This can happen when a measure formula references a column that contains many values ​​without specifying an aggregation such as 'min', 'max', 'count' or 'sum' to get a single result.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 14:47:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VLOOKUP-with-MAX/m-p/991224#M12315</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2020-03-25T14:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: VLOOKUP with MAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VLOOKUP-with-MAX/m-p/991429#M12327</link>
      <description>This is not a measure. It's a calculated column. This is what you asked for.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Wed, 25 Mar 2020 16:22:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VLOOKUP-with-MAX/m-p/991429#M12327</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-25T16:22:11Z</dc:date>
    </item>
  </channel>
</rss>

