<?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: Changing from Folder.Files to Folder.Contents causes error in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4017337#M131663</link>
    <description>&lt;P&gt;The error message "Expression.Error: The parameter is expected to be of type Text.Type or Binary.Type" typically occurs in Power BI when there is a mismatch in data types during transformations or when using a function that expects a specific type of input.&lt;/P&gt;&lt;P&gt;Here are a few steps to troubleshoot and fix this issue:&lt;/P&gt;&lt;H3&gt;Step-by-Step Troubleshooting:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Identify the Source of the Error&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Go to the &lt;STRONG&gt;Power Query Editor&lt;/STRONG&gt; by clicking on "Transform data" in the Home tab.&lt;/LI&gt;&lt;LI&gt;Look for the query named 'Transform File (3)'.&lt;/LI&gt;&lt;LI&gt;Check the applied steps in the query settings pane to identify where the error occurs.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Check Data Types&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Ensure that the columns used in the transformation are of the correct data type (Text.Type or Binary.Type).&lt;/LI&gt;&lt;LI&gt;If necessary, change the data type by selecting the column and then using the "Data Type" dropdown in the Transform tab.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Review Applied Steps&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Go through each step in the query to find where the type mismatch occurs.&lt;/LI&gt;&lt;LI&gt;If you find a step that applies a function expecting text or binary data but receives a different type, correct the data type before this step.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Sun, 30 Jun 2024 22:31:16 GMT</pubDate>
    <dc:creator>VN999</dc:creator>
    <dc:date>2024-06-30T22:31:16Z</dc:date>
    <item>
      <title>Changing from Folder.Files to Folder.Contents causes error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4016043#M131618</link>
      <description>&lt;P&gt;In the following query, if&amp;nbsp;&lt;U&gt;Folder.Files&lt;/U&gt; is changed to&amp;nbsp;&lt;U&gt;Folder.Contents&lt;/U&gt;, the following error is reported. What is the cause and what is the remedy?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An error occurred in the ‘Transform File (3)’ query. Expression.Error: The parameter is expected to be of type Text.Type or Binary.Type.&lt;BR /&gt;Details:&lt;BR /&gt;[Table]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;Source = Folder.Files("C:\WDS2\Projects\FTP\Production\UHC Work"),&lt;BR /&gt;#"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? &amp;lt;&amp;gt; true),&lt;BR /&gt;#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File (3)", each #"Transform File (3)"([Content])),&lt;BR /&gt;#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),&lt;BR /&gt;#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File (3)"}),&lt;BR /&gt;#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File (3)", Table.ColumnNames(#"Transform File (3)"(#"Sample File (3)"))),&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Source.Name", type text}, {"Portal/EDI ID", type text}, {"Customer #", type text}, {"Ship to #", type text}, {"Office #", type text}, {"Invoice Date", type date}, {"Invoice #", type text}, {"Invoice Type", type text}, {"Order Class", type text}, {"Customer PO#", type text}, {"CR Memo #", type text}, {"Billing Model", type text}, {"Patient Name", type text}, {"Patient Mdse", type number}, {"Tax City", type number}, {"Tax Rate Used", type number}, {"Tax County", type number}, {"Tax Other", type number}, {"Tax State", type number}, {"Tax Total", type number}, {"Patient Freight", type number}, {"Addons - Mdse", type any}, {"$Addons - Mdse", type number}, {"Addons - Other", type text}, {"$Addons - Other", type number}, {"Coupon Code", type any}, {"Coupon Discount", type number}, {"Patient Total", type number}, {"Insurance Benefit", type number}, {"CC Type", type text}, {"Patient Payment", type number}, {"Discrepancy", type number}, {"Ship Via", type text}, {"Freight Addon(s)", type text}, {"$Freight Addon(s)", type number}, {"Freight Credits(s)", type text}, {"$Freight Credit(s)", type number}, {"Contract Mdse", type number}, {"Contract Mdse Add", type any}, {"$Contract Mdse Add", type number}, {"Contract Freight", type number}, {"Contract Other", type text}, {"$Contract Other", type number}, {"Prescription Verification", type number}, {"CC Fee", type number}, {"Admin Fee", type number}, {"Contract Tax", type number}, {"Contract Total Due", type number}, {"AvaTax Proc. Fee", type number}, {"Partner Share", type number}, {"Wholesale Tax", type number}, {"Wholesale Mdse", type number}, {"Misc. Income", type number}, {"Due From/(To) Partner", type number}, {"JE SOURCE", type text}, {"1116 Debit", type number}, {"1116 Credit", type number}, {"1400 Debit", type number}, {"1400 Credit", type number}, {"3000 Debit", type number}, {"3000 Credit", type number}, {"4000 Debit", type number}, {"4000 Credit", type number}, {"4120 Debit", type number}, {"4120 Credit", type number}, {"4700 Debit", type number}, {"4700 Credit", type number}}),&lt;BR /&gt;#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Admin Fee", "AvaTax Proc. Fee", "Tax City", "Tax Rate Used", "Tax County", "Tax Other", "Tax State"})&lt;BR /&gt;in&lt;BR /&gt;#"Removed Columns"&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 16:24:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4016043#M131618</guid>
      <dc:creator>LMCarlson_ABB</dc:creator>
      <dc:date>2024-06-28T16:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from Folder.Files to Folder.Contents causes error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4017330#M131662</link>
      <description>&lt;P&gt;The only difference is that Folder.Contents also lists the subfolders&amp;nbsp; (indicated by "Table")&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you filter these out then you should get your expected result.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2024 22:22:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4017330#M131662</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-30T22:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from Folder.Files to Folder.Contents causes error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4017337#M131663</link>
      <description>&lt;P&gt;The error message "Expression.Error: The parameter is expected to be of type Text.Type or Binary.Type" typically occurs in Power BI when there is a mismatch in data types during transformations or when using a function that expects a specific type of input.&lt;/P&gt;&lt;P&gt;Here are a few steps to troubleshoot and fix this issue:&lt;/P&gt;&lt;H3&gt;Step-by-Step Troubleshooting:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Identify the Source of the Error&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Go to the &lt;STRONG&gt;Power Query Editor&lt;/STRONG&gt; by clicking on "Transform data" in the Home tab.&lt;/LI&gt;&lt;LI&gt;Look for the query named 'Transform File (3)'.&lt;/LI&gt;&lt;LI&gt;Check the applied steps in the query settings pane to identify where the error occurs.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Check Data Types&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Ensure that the columns used in the transformation are of the correct data type (Text.Type or Binary.Type).&lt;/LI&gt;&lt;LI&gt;If necessary, change the data type by selecting the column and then using the "Data Type" dropdown in the Transform tab.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Review Applied Steps&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Go through each step in the query to find where the type mismatch occurs.&lt;/LI&gt;&lt;LI&gt;If you find a step that applies a function expecting text or binary data but receives a different type, correct the data type before this step.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Sun, 30 Jun 2024 22:31:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4017337#M131663</guid>
      <dc:creator>VN999</dc:creator>
      <dc:date>2024-06-30T22:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from Folder.Files to Folder.Contents causes error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4030949#M132076</link>
      <description>&lt;P&gt;I'm pretty sure the error is with this&amp;nbsp;&lt;SPAN&gt;"&lt;U&gt;Transform File (3)", Table.ColumnNames(#"Transform File (3)"(#"Sample File (3)".&lt;/U&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Unfortunately, I'm very new to PQ and I don't have a clue how to fix it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 18:35:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4030949#M132076</guid>
      <dc:creator>LMCarlson_ABB</dc:creator>
      <dc:date>2024-07-08T18:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from Folder.Files to Folder.Contents causes error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4031003#M132081</link>
      <description>&lt;P&gt;You would study what Transform File (3) does, and then completely replace with your own code.&amp;nbsp; Keep learning Power Query, it's a useful skill to have.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 19:17:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4031003#M132081</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-07-08T19:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from Folder.Files to Folder.Contents causes error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4035658#M132266</link>
      <description>&lt;P&gt;I would study &lt;SPAN&gt;Transform File (3)&amp;nbsp;&lt;/SPAN&gt;if I could find its source and/or documentation. So far that has elueded me.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 22:10:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4035658#M132266</guid>
      <dc:creator>LMCarlson_ABB</dc:creator>
      <dc:date>2024-07-10T22:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from Folder.Files to Folder.Contents causes error</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4035681#M132269</link>
      <description>&lt;P&gt;Go to Power Query, and you find it on the left side in its own group.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 23:02:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Changing-from-Folder-Files-to-Folder-Contents-causes-error/m-p/4035681#M132269</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-07-10T23:02:29Z</dc:date>
    </item>
  </channel>
</rss>

