<?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 Receiving Error with DAX formula in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Receiving-Error-with-DAX-formula/m-p/2831903#M90250</link>
    <description>&lt;P&gt;Hello Folks,&amp;nbsp; I am brand new to Power bi and am trying to get through learning it.&amp;nbsp; I wrote the following DAX formula - "Customer Order Amount = LOOKUPVALUE('Stock Inventory'[Unit Price],'Stock Inventory'[SKU ID],'Weekly Demand Sheet'[SKU ID])*'Weekly Demand Sheet'[Weeks Demand]) - I receive the following 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;I am so frustrated (NOOBITIS) - I can't figure out how to fix this, so I can create my forecasting - can anyone help?&amp;nbsp; I will be most grateful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;</description>
    <pubDate>Mon, 10 Oct 2022 18:44:02 GMT</pubDate>
    <dc:creator>HEHuggins</dc:creator>
    <dc:date>2022-10-10T18:44:02Z</dc:date>
    <item>
      <title>Receiving Error with DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Receiving-Error-with-DAX-formula/m-p/2831903#M90250</link>
      <description>&lt;P&gt;Hello Folks,&amp;nbsp; I am brand new to Power bi and am trying to get through learning it.&amp;nbsp; I wrote the following DAX formula - "Customer Order Amount = LOOKUPVALUE('Stock Inventory'[Unit Price],'Stock Inventory'[SKU ID],'Weekly Demand Sheet'[SKU ID])*'Weekly Demand Sheet'[Weeks Demand]) - I receive the following 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;I am so frustrated (NOOBITIS) - I can't figure out how to fix this, so I can create my forecasting - can anyone help?&amp;nbsp; I will be most grateful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2022 18:44:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Receiving-Error-with-DAX-formula/m-p/2831903#M90250</guid>
      <dc:creator>HEHuggins</dc:creator>
      <dc:date>2022-10-10T18:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving Error with DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Receiving-Error-with-DAX-formula/m-p/2832408#M90270</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="454292" data-lia-user-login="HEHuggins" class="lia-mention lia-mention-user"&gt;HEHuggins&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, when you use the LOOKUPVALUE() function, an error is reported. Right?&lt;/P&gt;
&lt;P&gt;For this function, if we use the associated field to match multiple values, it will report an error, and I reproduced this error through test data.&lt;/P&gt;
&lt;P&gt;My test data is this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Since we want to get the [Unit Price] field in the Stock Inventory table, but we have two values [SKU ID]=4 in the table, the engine cannot tell which value needs to be obtained, resulting in an error:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the case of duplicate values, we need to choose the maximum or minimum value according to the actual needs, and we can use the following measures to solve this problem:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = var _cuurent_id = 'Weekly Demand Sheet'[SKU ID] 
var _t= FILTER('Stock Inventory','Stock Inventory'[SKU ID]= _cuurent_id)
var _unit_price = MAXX(_t ,[Unit Price])
return 
_unit_price&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The result is as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 01:31:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Receiving-Error-with-DAX-formula/m-p/2832408#M90270</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2022-10-11T01:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving Error with DAX formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Receiving-Error-with-DAX-formula/m-p/2834261#M90372</link>
      <description>&lt;P&gt;I was wanting it to caluculate the demand - so weeks demand x unit price =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I used this and then just added another column multiplying the two - so thank you &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 14:12:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Receiving-Error-with-DAX-formula/m-p/2834261#M90372</guid>
      <dc:creator>HEHuggins</dc:creator>
      <dc:date>2022-10-11T14:12:16Z</dc:date>
    </item>
  </channel>
</rss>

