<?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: The Expression Refers To Multiple Columns. Multiple Columns Cannot Be Converted To A Scalar Value. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893306#M186239</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1441306" data-lia-user-login="L1102" class="lia-mention lia-mention-user"&gt;L1102&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;The error &lt;STRONG&gt;“The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value”&lt;/STRONG&gt; occurs because within CALCULATETABLE you are attempting to use expressions such as Data_Table[$ SPPD] &amp;lt; AVGSPPD directly. This returns an entire column rather than a logical value for each row.&lt;/DIV&gt;&lt;DIV class=""&gt;In DAX, when filtering a table, you need to use functions that evaluate row by row, such as FILTER().&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Could you try adpation you code would look like this:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;Red Flag =
VAR AVGSPPD = AVERAGE(Data_Table[$ SPPD])
VAR AVGWTD = AVERAGE(Data_Table[Wghtd Dist])
RETURN
CALCULATETABLE(
    Data_Table,
    FILTER(
        Data_Table,
        Data_Table[$ SPPD] &amp;lt; AVGSPPD &amp;amp;&amp;amp;
        Data_Table[Wghtd Dist] &amp;gt; AVGWTD
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this response was helpful in any way, I’d gladly accept a &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;much like the joy of seeing a DAX measure work first time without needing another FILTER.&lt;/P&gt;&lt;P&gt;Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop &lt;span class="lia-unicode-emoji" title=":cyclone:"&gt;🌀&lt;/span&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Dec 2025 15:41:57 GMT</pubDate>
    <dc:creator>Zanqueta</dc:creator>
    <dc:date>2025-12-04T15:41:57Z</dc:date>
    <item>
      <title>The Expression Refers To Multiple Columns. Multiple Columns Cannot Be Converted To A Scalar Value.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893287#M186236</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking to calculate 4 tables that list items based on a conbination of conditions based on 2 different averages. Depending on my &amp;lt;/&amp;gt; condition will be dependent on what table the items will fall in. Below is what I put in for the first table, but was return with the error mentioned in above. Your help is greatly appriciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Red Flag =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;AVGSPPD&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Data_Table&lt;/SPAN&gt;&lt;SPAN&gt;[$ SPPD]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;AVGWTD&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Data_Table&lt;/SPAN&gt;&lt;SPAN&gt;[Wghtd Dist]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATETABLE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Data_Table&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data_Table&lt;/SPAN&gt;&lt;SPAN&gt;[$ SPPD]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;AVGSPPD&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data_Table&lt;/SPAN&gt;&lt;SPAN&gt;[Wghtd Dist]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;AVGWTD&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 Dec 2025 15:16:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893287#M186236</guid>
      <dc:creator>L1102</dc:creator>
      <dc:date>2025-12-04T15:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: The Expression Refers To Multiple Columns. Multiple Columns Cannot Be Converted To A Scalar Value.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893293#M186237</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1441306" data-lia-user-login="L1102" class="lia-mention lia-mention-user"&gt;L1102&lt;/a&gt;&amp;nbsp;Measures and calculated columns cannot return a table. Only calculated tables can return a table. So your RETURN statement where you are using CALCULATETABLE, that returns a table. You could instead use CALCULATE to return a scalar (single number/text).&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 15:22:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893293#M186237</guid>
      <dc:creator>GeraldGEmerick</dc:creator>
      <dc:date>2025-12-04T15:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: The Expression Refers To Multiple Columns. Multiple Columns Cannot Be Converted To A Scalar Value.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893306#M186239</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1441306" data-lia-user-login="L1102" class="lia-mention lia-mention-user"&gt;L1102&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;The error &lt;STRONG&gt;“The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value”&lt;/STRONG&gt; occurs because within CALCULATETABLE you are attempting to use expressions such as Data_Table[$ SPPD] &amp;lt; AVGSPPD directly. This returns an entire column rather than a logical value for each row.&lt;/DIV&gt;&lt;DIV class=""&gt;In DAX, when filtering a table, you need to use functions that evaluate row by row, such as FILTER().&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Could you try adpation you code would look like this:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;Red Flag =
VAR AVGSPPD = AVERAGE(Data_Table[$ SPPD])
VAR AVGWTD = AVERAGE(Data_Table[Wghtd Dist])
RETURN
CALCULATETABLE(
    Data_Table,
    FILTER(
        Data_Table,
        Data_Table[$ SPPD] &amp;lt; AVGSPPD &amp;amp;&amp;amp;
        Data_Table[Wghtd Dist] &amp;gt; AVGWTD
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this response was helpful in any way, I’d gladly accept a &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;much like the joy of seeing a DAX measure work first time without needing another FILTER.&lt;/P&gt;&lt;P&gt;Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop &lt;span class="lia-unicode-emoji" title=":cyclone:"&gt;🌀&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 15:41:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893306#M186239</guid>
      <dc:creator>Zanqueta</dc:creator>
      <dc:date>2025-12-04T15:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: The Expression Refers To Multiple Columns. Multiple Columns Cannot Be Converted To A Scalar Value.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893328#M186241</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="861055" data-lia-user-login="Zanqueta" class="lia-mention lia-mention-user"&gt;Zanqueta&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the FILTER expression earlier this morning and it returned the same error.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 15:58:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893328#M186241</guid>
      <dc:creator>L1102</dc:creator>
      <dc:date>2025-12-04T15:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: The Expression Refers To Multiple Columns. Multiple Columns Cannot Be Converted To A Scalar Value.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893335#M186242</link>
      <description>&lt;P&gt;You must be by mistake being creating a measure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A measure cannot return a table, you should create a new table (Modeling -&amp;gt; New Table)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this helped, please consider giving kudos and mark as a solution&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="273" data-lia-user-login="me" class="lia-mention lia-mention-user"&gt;me&lt;/a&gt; in replies or I'll lose your thread&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Want to check your DAX skills? &lt;A href="https://www.linkedin.com/company/kubisco/" target="_blank"&gt;Answer my biweekly DAX challenges on the kubisco Linkedin page&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Consider voting &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Power-BI-Filter-Pane-as-an-icon-on-the-right-side-bar-in-on/idi-p/4728588" target="_blank"&gt;this Power BI idea&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Francesco Bergamaschi&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MBA, M.Eng, M.Econ, Professor of BI&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 16:04:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893335#M186242</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2025-12-04T16:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: The Expression Refers To Multiple Columns. Multiple Columns Cannot Be Converted To A Scalar Value.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893340#M186243</link>
      <description>&lt;P&gt;So embarrasing... this is exactly what was happening.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 16:12:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Expression-Refers-To-Multiple-Columns-Multiple-Columns/m-p/4893340#M186243</guid>
      <dc:creator>L1102</dc:creator>
      <dc:date>2025-12-04T16:12:20Z</dc:date>
    </item>
  </channel>
</rss>

