<?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: Table of multiple values was supplied where a single value was expected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-of-multiple-values-was-supplied-where-a-single-value-was/m-p/3132149#M111491</link>
    <description>&lt;P&gt;Solved!&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/LookupValue-with-Filter/td-p/993672" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/LookupValue-with-Filter/td-p/993672&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just need to use the&amp;nbsp;&lt;SPAN&gt;second lookup parameters of LOOKUPVALUE:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Has SPCC = &lt;/SPAN&gt;&lt;SPAN&gt;LOOKUPVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(Plans[PlanTypeCode],Plans[FacilityId],&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(Facilities[Id]),Plans[PlanTypeCode],&lt;/SPAN&gt;&lt;SPAN&gt;"SPCC"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 Mar 2023 23:41:09 GMT</pubDate>
    <dc:creator>tomascid</dc:creator>
    <dc:date>2023-03-14T23:41:09Z</dc:date>
    <item>
      <title>Table of multiple values was supplied where a single value was expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-of-multiple-values-was-supplied-where-a-single-value-was/m-p/3129081#M111260</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Hi there - referencing the example data above, I'm trying to create the 'desired output' as a dashboard visual using measures (instead of PowerQuery or calculated columns).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started with this measure:&lt;/P&gt;&lt;P&gt;HasSPCC = LOOKUPVALUE(Plans[PlanTypeCode],Plans[FacilityId],SELECTEDVALUE(Facilities[FacilityId]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Translated to English, I'm Facilities [FacilityID] within Plans [FacilityID] column and returning result Plans [PlanTypeCode].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get this error: "ERROR: A table of multiple values was supplied where a single value was expected."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume it's because Plans [FacilityID] is not unique (there can be several different plans for each facility - see yellow highlights).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on that, I assumed that wrapping the measure in a CALCULATE function would work. I tried these two, with no luck:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;HasSPCC = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;LOOKUPVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Plans&lt;/SPAN&gt;&lt;SPAN&gt;[PlanTypeCode]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Plans&lt;/SPAN&gt;&lt;SPAN&gt;[FacilityId]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&l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N&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Neither worked, same issue. Any ideas?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 19:44:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-of-multiple-values-was-supplied-where-a-single-value-was/m-p/3129081#M111260</guid>
      <dc:creator>tomascid</dc:creator>
      <dc:date>2023-03-13T19:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Table of multiple values was supplied where a single value was expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-of-multiple-values-was-supplied-where-a-single-value-was/m-p/3129132#M111267</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="214990" data-lia-user-login="tomascid" class="lia-mention lia-mention-user"&gt;tomascid&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;create a relationship between the two tables. Use a matrix visual.. place Facilities[Facility ID] in the rows of the matrix. Place Plans[PlanTypeCode] in the columns of the matrix and place the following measure in the values of the matrix&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Count = COUNTROWS ( Plans )&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 20:12:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-of-multiple-values-was-supplied-where-a-single-value-was/m-p/3129132#M111267</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-13T20:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Table of multiple values was supplied where a single value was expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-of-multiple-values-was-supplied-where-a-single-value-was/m-p/3132149#M111491</link>
      <description>&lt;P&gt;Solved!&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/LookupValue-with-Filter/td-p/993672" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/LookupValue-with-Filter/td-p/993672&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just need to use the&amp;nbsp;&lt;SPAN&gt;second lookup parameters of LOOKUPVALUE:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Has SPCC = &lt;/SPAN&gt;&lt;SPAN&gt;LOOKUPVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(Plans[PlanTypeCode],Plans[FacilityId],&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(Facilities[Id]),Plans[PlanTypeCode],&lt;/SPAN&gt;&lt;SPAN&gt;"SPCC"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Mar 2023 23:41:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-of-multiple-values-was-supplied-where-a-single-value-was/m-p/3132149#M111491</guid>
      <dc:creator>tomascid</dc:creator>
      <dc:date>2023-03-14T23:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Table of multiple values was supplied where a single value was expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-of-multiple-values-was-supplied-where-a-single-value-was/m-p/3138149#M111932</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="214990" data-lia-user-login="tomascid" class="lia-mention lia-mention-user"&gt;tomascid&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can try the following methods&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&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;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 08:02:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-of-multiple-values-was-supplied-where-a-single-value-was/m-p/3138149#M111932</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2023-03-17T08:02:14Z</dc:date>
    </item>
  </channel>
</rss>

