<?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: Using LOOKUPVALUE to compare two values with duplicates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1265325#M21185</link>
    <description>&lt;P&gt;What is your plan for scenarios when either of the entries is missing or duplicated?&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jul 2020 15:49:29 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2020-07-31T15:49:29Z</dc:date>
    <item>
      <title>Using LOOKUPVALUE to compare two values with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1263344#M21102</link>
      <description>&lt;P&gt;New to DAX and its language.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to make a measure that gives feedback if a date from one column is greater than a date in another column. This is for multiple projects that are using the same base template with different dates for each. So duplicate columns are expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IsNetworkReadyOnTrackforUAT = IF(LOOKUPVALUE(Tasks[TaskFinishDate],Tasks[ShortTaskName],"NETWORK READY") &amp;gt; LOOKUPVALUE(Tasks[TaskFinishDate],Tasks[ShortTaskName],"UAT"), "IN TROUBLE","ALL GOOD")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this produces an error of multiple values. In researching, I tried using calculate with FIRSTNONBLANK like this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;IsNetworkReadyOnTrackforUAT = IF(&lt;BR /&gt;CALCULATE(&lt;BR /&gt;FIRSTNONBLANK(Tasks[TaskFinishDate], 1),&lt;BR /&gt;FILTER(ALL(Tasks),Tasks[ShortTaskName] = "UAT")&lt;BR /&gt;)&lt;BR /&gt;&amp;gt;&lt;BR /&gt;CALCULATE(&lt;BR /&gt;FIRSTNONBLANK(Tasks[TaskFinishDate], 1),&lt;BR /&gt;FILTER(ALL(Tasks),Tasks[ShortTaskName] = "NETWORK READY")&lt;BR /&gt;),&lt;BR /&gt;"IN TROUBLE",&lt;BR /&gt;"ALL GOOD")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This returns the same value for all of the rows (each row has a different value).&amp;nbsp; Here is a snapshot of the data.&amp;nbsp;&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;I think I'm missing something basic but unsure.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 21:54:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1263344#M21102</guid>
      <dc:creator>tlh</dc:creator>
      <dc:date>2020-07-30T21:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using LOOKUPVALUE to compare two values with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1263597#M21110</link>
      <description>&lt;P&gt;your sample data doesn't match your description.&amp;nbsp; It is unclear if you are trying to look up something in the same table or another table (LOOKUPVALUE is usually used for the latter).&amp;nbsp; Please elaborate.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 02:49:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1263597#M21110</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-07-31T02:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using LOOKUPVALUE to compare two values with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1264824#M21157</link>
      <description>&lt;P&gt;No, all the data is contained within the same table.&lt;/P&gt;&lt;P&gt;Here is a summary of what I'm looking to do:&lt;/P&gt;&lt;P&gt;For each PROJECT NAME, find the TASK NAME called "UAT" and select the START date. For each PROJECT NAME, find the TASK NAME called "NETWORK READY" and select the START date. Comp[are these two START dates. If the START date for UAT &lt;U&gt;is greater than&lt;/U&gt; the START date for "NETWORK READY", output "GOOD". Else, output "BAD".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've highlighted two example columns out of my data.&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;The output here in this case should be GOOD.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 12:00:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1264824#M21157</guid>
      <dc:creator>tlh</dc:creator>
      <dc:date>2020-07-31T12:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using LOOKUPVALUE to compare two values with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1265112#M21174</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="246541" data-lia-user-login="tlh" class="lia-mention lia-mention-user"&gt;tlh&lt;/a&gt;&amp;nbsp;, below is formula, i added a condition: if we are missing data for either uat or network days return "no compare".&lt;BR /&gt;&lt;BR /&gt;Result&amp;nbsp;=&lt;BR /&gt;&lt;SPAN class="Keyword"&gt;VAR&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Variable"&gt;_UatStart&lt;/SPAN&gt;&amp;nbsp;=&lt;BR /&gt;&lt;SPAN class="indent4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Keyword"&gt;LOOKUPVALUE&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Tasks[Start],&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Tasks[Task&amp;nbsp;Name],&amp;nbsp;&lt;SPAN class="StringLiteral"&gt;"UAT"&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Tasks[Project&amp;nbsp;Name],&amp;nbsp;Tasks[Project&amp;nbsp;Name]&lt;BR /&gt;&lt;SPAN class="indent4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="Keyword"&gt;VAR&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Variable"&gt;_NetworkStart&lt;/SPAN&gt;&amp;nbsp;=&lt;BR /&gt;&lt;SPAN class="indent4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Keyword"&gt;LOOKUPVALUE&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Tasks[Start],&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Tasks[Task&amp;nbsp;Name],&amp;nbsp;&lt;SPAN class="StringLiteral"&gt;"NETWORK&amp;nbsp;READY"&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Tasks[Project&amp;nbsp;Name],&amp;nbsp;Tasks[Project&amp;nbsp;Name]&lt;BR /&gt;&lt;SPAN class="indent4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="Keyword"&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="indent4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Keyword"&gt;IF&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Tasks[Task&amp;nbsp;Name]&amp;nbsp;&lt;SPAN class="Keyword"&gt;IN&lt;/SPAN&gt;&amp;nbsp;{&amp;nbsp;&lt;SPAN class="StringLiteral"&gt;"UAT"&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN class="StringLiteral"&gt;"NETWORK&amp;nbsp;READY"&lt;/SPAN&gt;&amp;nbsp;},&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Keyword"&gt;IF&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="indent4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Keyword"&gt;AND&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Keyword"&gt;NOT&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Keyword"&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Variable"&gt;_NetworkStart&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN class="Keyword"&gt;NOT&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Keyword"&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Variable"&gt;_UatStart&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="indent4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Keyword"&gt;IF&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Variable"&gt;_NetworkStart&lt;/SPAN&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;SPAN class="Variable"&gt;_UatStart&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN class="StringLiteral"&gt;"IN&amp;nbsp;TROUBLE"&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN class="StringLiteral"&gt;"ALL&amp;nbsp;GOOD"&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="indent4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="StringLiteral"&gt;"NO&amp;nbsp;COMPARE"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="indent8"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="indent4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 14:17:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1265112#M21174</guid>
      <dc:creator>nandic</dc:creator>
      <dc:date>2020-07-31T14:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using LOOKUPVALUE to compare two values with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1265325#M21185</link>
      <description>&lt;P&gt;What is your plan for scenarios when either of the entries is missing or duplicated?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 15:49:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1265325#M21185</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-07-31T15:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using LOOKUPVALUE to compare two values with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1265586#M21197</link>
      <description>&lt;P&gt;Thanks for your help, but still not working. Here is what I'm doing. I duplicated the data into a table called TestTable and updated your formula.&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No plans for that yet. It should never happen as they are a part of the template used.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 19:12:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1265586#M21197</guid>
      <dc:creator>tlh</dc:creator>
      <dc:date>2020-07-31T19:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using LOOKUPVALUE to compare two values with duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1265673#M21199</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="246541" data-lia-user-login="tlh" class="lia-mention lia-mention-user"&gt;tlh&lt;/a&gt;&amp;nbsp;there are fields underlined with red line, it means that there is no such field in your table/model. Check these and make sure you type it correctly.&lt;/P&gt;&lt;P&gt;Another thing, if there are no underlined fields and you get error that it cant get single value (as on screenshot) it means that there is still column in table which we need to add in lookup as on current lookup parameters dax cant find unique value.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 20:19:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-LOOKUPVALUE-to-compare-two-values-with-duplicates/m-p/1265673#M21199</guid>
      <dc:creator>nandic</dc:creator>
      <dc:date>2020-07-31T20:19:54Z</dc:date>
    </item>
  </channel>
</rss>

