Forum Discussion
Trying to expand binary content
When i tried above solution then getting below error
That's what you get opening a Binary
As you can see it is not a supported data type
Binary data type
The Binary data type can be used to represent any other data with a binary format. Inside the Power Query Editor, you can use it when loading binary files if you convert it to other data types before loading it to the Power BI model. Binary columns aren't supported in the Power BI data model. It exists in the Data View and Report View menus for legacy reasons but if you try to load binary columns to the Power BI model you may run into errors.
Note
If a binary column is in the output of the steps of a query, attempting to refresh the data through a gateway can cause errors. It's recommended that you explicitly remove any binary columns as the last step in your queries.
If you want to get the content of the file it depends on the type (excel, csv etc.)
- fcerullo3 years agoAdvocate ICombining Binary files:I know how to do it by adding a custom column forcsv files =Csv.Document([Content])orExcel files = Excel.Workbook([Content])But, what about .txt files?Is there a command that does the same as above"?my reasoning:I HATE those auto-created transformation files, and I like to keep certain columns to identify dates or original source, which the first to allow me to do, but the Combine button removes.
- WanderingBI2 years agoResolver III
A .csv file is actually a ".txt" file. CSV just stands for comma seperated values. So you can use the same function (Csv.Document()) for your other files. You might have to check how the values are seperated in your files. Maybe it is by a Tab instead of a comma.
Note that when you expand the "Content" column all column names will be hardcoded in the query. Just wanting to let you know that there is a way around that by first saving all the column names in a variable and then putting this variable into the Expand function as an argument.
You can check the documentation for this function here to see what the other arguments of the function do: