<?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: Expression.Error: We cannot apply operator &amp;amp; to types Number and Text in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2671042#M79660</link>
    <description>&lt;P&gt;You just need to find string where is mistake. And change type of column from text to int&lt;/P&gt;</description>
    <pubDate>Sun, 31 Jul 2022 11:21:55 GMT</pubDate>
    <dc:creator>technolog</dc:creator>
    <dc:date>2022-07-31T11:21:55Z</dc:date>
    <item>
      <title>Expression.Error: We cannot apply operator &amp; to types Number and Text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2671028#M79659</link>
      <description>&lt;P&gt;Expression.Error: We cannot apply operator &amp;amp; to types Number and Text. Details: Operator=&amp;amp; Left=394838 Right=4274030&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;let&lt;BR /&gt;Source = SharePoint.Files("&lt;A href="https://sharepoint.com/PowerBiDashboards" target="_blank"&gt;https://sharepoint.com/PowerBiDashboards&lt;/A&gt;", [ApiVersion = 15]),&lt;BR /&gt;#"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "VG Global OTD") and [Extension] = ".xlsx"),&lt;BR /&gt;#"Filtered Hidden Files1" = Table.SelectRows(#"Filtered Rows", each [Attributes]?[Hidden]? &amp;lt;&amp;gt; true),&lt;BR /&gt;#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File (2)", each #"Transform File (2)"([Content])),&lt;BR /&gt;#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),&lt;BR /&gt;#"Expanded Table Column1" = Table.ExpandTableColumn(#"Renamed Columns1", "Transform File (2)", Table.ColumnNames(#"Transform File (2)"(#"Sample File (2)"))),&lt;BR /&gt;#"Added Custom" = Table.AddColumn(#"Expanded Table Column1", "PK_Plant", each [Site]&amp;amp;[Order Type]&amp;amp;[Product Line]),&lt;BR /&gt;#"Split Column by Delimiter" = Table.SplitColumn(Table.TransformColumnTypes(#"Added Custom", {{"Line Number", type text}}, "en-US"), "Line Number", Splitter.SplitTextByDelimiter(".", QuoteStyle.None), {"Line Number.1", "Line Number.2"}),&lt;BR /&gt;#"Added Custom1" = Table.AddColumn(#"Split Column by Delimiter", "Date", each [#"ScheduleShipDate/Promise Date"]),&lt;BR /&gt;#"Split Column by Delimiter2" = Table.SplitColumn(Table.TransformColumnTypes(#"Added Custom1", {{"Date", type text}}, "en-US"), "Date", Splitter.SplitTextByDelimiter("/", QuoteStyle.None), {"Date.1", "Date.2", "Date.3"}),&lt;BR /&gt;#"Added Custom2" = Table.AddColumn(#"Split Column by Delimiter2", "Date", each [Date.1]&amp;amp;"/"&amp;amp;[Date.2]&amp;amp;"/"&amp;amp;[Date.3]),&lt;BR /&gt;#"Changed Type3" = Table.TransformColumnTypes(#"Added Custom2",{{"Date", type date}}),&lt;BR /&gt;#"Added Custom3" = Table.AddColumn(#"Changed Type3", "Month", each Date.Month([Date])),&lt;BR /&gt;#"Changed Type4" = Table.TransformColumnTypes(#"Added Custom3",{{"Month", type text}}),&lt;BR /&gt;#"Added Custom4" = Table.AddColumn(#"Changed Type4", "Item_Order_Line", each [Item Number]&amp;amp;[Order Number]&amp;amp;[Line Number.1]&amp;amp;[Month]),&lt;BR /&gt;#"Added Conditional Column" = Table.AddColumn(#"Added Custom4", "Early", each if [#"Early/Late/On Time"] = "Early" then 1 else 0),&lt;BR /&gt;#"Added Conditional Column1" = Table.AddColumn(#"Added Conditional Column", "On Time", each if [#"Early/Late/On Time"] = "On Time" then 1 else 0),&lt;BR /&gt;#"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "Late", each if [#"Early/Late/On Time"] = "Late" then 1 else 0),&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(#"Added Conditional Column2",{{"Early/Late/On Time", type text}, {"Is Partial?", type text}, {"Early", Int64.Type}, {"On Time", Int64.Type}, {"Late", Int64.Type}, {"Month", type text}, {"Date.3", Int64.Type}, {"Date.2", Int64.Type}, {"Date.1", Int64.Type}, {"Item_Order_Line", type text}, {"Item Number", type text}, {"Order Number", type text}, {"Site", type text}, {"Order Type", type text}, {"Product Line", type text}}),&lt;BR /&gt;#"Grouped Rows" = Table.Group(#"Changed Type", {"Item_Order_Line"}, {{"Early", each List.Sum([Early]), type number}, {"On time", each List.Sum([On Time]), type number}, {"Late", each List.Sum([Late]), type number}}),&lt;BR /&gt;#"Added Conditional Column3" = Table.AddColumn(#"Grouped Rows", "Early_Late_On Time", each if [Late] &amp;gt; 0 then [Late] else if [Early] &amp;gt; 0 then [Early] else [On time]),&lt;BR /&gt;#"Added Conditional Column4" = Table.AddColumn(#"Added Conditional Column3", "V_Early_Late_On Time", each if [Late] &amp;gt; 0 then "Late" else if [Early] &amp;gt; 0 then "Early" else "On Time")&lt;BR /&gt;in&lt;BR /&gt;#"Added Conditional Column4"&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 10:46:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2671028#M79659</guid>
      <dc:creator>Tanmaub8055</dc:creator>
      <dc:date>2022-07-31T10:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Expression.Error: We cannot apply operator &amp; to types Number and Text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2671042#M79660</link>
      <description>&lt;P&gt;You just need to find string where is mistake. And change type of column from text to int&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 11:21:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2671042#M79660</guid>
      <dc:creator>technolog</dc:creator>
      <dc:date>2022-07-31T11:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expression.Error: We cannot apply operator &amp; to types Number and Text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2671181#M79670</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="419491" data-lia-user-login="Tanmaub8055" class="lia-mention lia-mention-user"&gt;Tanmaub8055&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a similar blog or post to follow&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Power-Query/Expression-Error-We-cannot-apply-operator-to-types-Text-and-Text/td-p/2229843" target="_blank" rel="noopener"&gt;Solved: Expression.Error: We cannot apply operator - to ty... - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HINT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Indeed The list.sum caused the error when i pivoted the column. I realize the that the column i pivoted has both numberical and text values. I changed from sum to "dont aggregate" and now the model works fine. Not concerned with not summing my like-like values as the raw data are summations already from previous models.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ritesh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Mark my post as a solution if it helped you&lt;/FONT&gt;|&lt;FONT color="#000000"&gt;&amp;nbsp;Munde and Kudis (Ladies and Gentlemen) I like your Kudos!!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;!!&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;A href="https://www.youtube.com/channel/UCOK8xNgwlypFkU6aCEThCmw" target="_self" rel="nofollow noreferrer noopener"&gt;My YT Channel Dancing With Data&lt;/A&gt;&amp;nbsp;!!&amp;nbsp;&lt;A href="https://www.linkedin.com/in/ritesh-bisht-22238913/" target="_self" rel="nofollow noreferrer noopener"&gt;Connect on Linkedin&lt;/A&gt;&amp;nbsp;!!&lt;A href="https://www.youtube.com/watch?v=XE-HehSTmGo&amp;amp;list=PL9z26CJ-fucFCNaSAKlBujSFY22tZhcDr" target="_self" rel="nofollow noopener noreferrer"&gt;Power BI for Tableau Users&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 16:28:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2671181#M79670</guid>
      <dc:creator>ribisht17</dc:creator>
      <dc:date>2022-07-31T16:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Expression.Error: We cannot apply operator &amp; to types Number and Text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2671262#M79676</link>
      <description>&lt;P&gt;I'd guess the issue is in one of these places:&lt;/P&gt;
&lt;LI-CODE lang="php"&gt; "PK_Plant", each [Site]&amp;amp;[Order Type]&amp;amp;[Product Line]&lt;/LI-CODE&gt;&lt;LI-CODE lang="php"&gt;"Item_Order_Line", each [Item Number]&amp;amp;[Order Number]&amp;amp;[Line Number.1]&amp;amp;[Month]&lt;/LI-CODE&gt;
&lt;P&gt;Check that each of these columns is a text type prior to attempting to concatenate them as text.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 18:12:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2671262#M79676</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2022-07-31T18:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Expression.Error: We cannot apply operator &amp; to types Number and Text</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2675185#M79896</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="419491" data-lia-user-login="Tanmaub8055" class="lia-mention lia-mention-user"&gt;Tanmaub8055&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might be a data type issue. Note that the Combination operator (&amp;amp;) is suitable for the following scenarios:&lt;/P&gt;
&lt;P&gt;1）Text concatenation&lt;/P&gt;
&lt;P&gt;2）List concatenation&lt;/P&gt;
&lt;P&gt;3）Record merge&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more information, please refer to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/powerquery-m/operators" target="_blank"&gt;Operators - PowerQuery M | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, if the data types are Number and Text, you will get the following error: We cannot apply operator &amp;amp; to types Number and Text.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The solution is very simple, please convert all data types to text.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you can use operator (&amp;amp;) normally.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SUP&gt;Best Regards,&lt;/SUP&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SUP&gt;Yadong Fang&lt;/SUP&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SUP&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/SUP&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 09:49:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-We-cannot-apply-operator-amp-to-types-Number/m-p/2675185#M79896</guid>
      <dc:creator>v-yadongf-msft</dc:creator>
      <dc:date>2022-08-02T09:49:10Z</dc:date>
    </item>
  </channel>
</rss>

