Forum Discussion
Changing from Folder.Files to Folder.Contents causes error
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.
Here are a few steps to troubleshoot and fix this issue:
Step-by-Step Troubleshooting:
Identify the Source of the Error:
- Go to the Power Query Editor by clicking on "Transform data" in the Home tab.
- Look for the query named 'Transform File (3)'.
- Check the applied steps in the query settings pane to identify where the error occurs.
Check Data Types:
- Ensure that the columns used in the transformation are of the correct data type (Text.Type or Binary.Type).
- If necessary, change the data type by selecting the column and then using the "Data Type" dropdown in the Transform tab.
Review Applied Steps:
- Go through each step in the query to find where the type mismatch occurs.
- 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.
- LMCarlson_ABB2 years agoFrequent Visitor
I'm pretty sure the error is with this "Transform File (3)", Table.ColumnNames(#"Transform File (3)"(#"Sample File (3)".
Unfortunately, I'm very new to PQ and I don't have a clue how to fix it.
- lbendlin2 years agoSuper User
You would study what Transform File (3) does, and then completely replace with your own code. Keep learning Power Query, it's a useful skill to have.
- LMCarlson_ABB2 years agoFrequent Visitor
I would study Transform File (3) if I could find its source and/or documentation. So far that has elueded me.