Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Trying to expand binary content

Hi,

Is there any other way to expand this content, because if i click on expand icon besides Content, then it is not working

Usinghal_0-1644478793254.png

 

10 REPLIES 10
kymramosrpo
Advocate IV
Advocate IV

Hello! By now I'm assuming you have found a solution to this, but just in case anyone would find this post asking the same or a similar question, here's my suggestion:

 

1. Keep the 'Content' column with 'Binary' values.

kymramosrpo_0-1718804319539.png


2. Add a custom column and paste, Table.FromList(Lines.FromBinary([Content])).

kymramosrpo_1-1718804375550.png


3. Keep that custom column (i.e., with 'Table' values).

4. Expand that column by clicking on the ↰↱ button in the top right corner of the column.

kymramosrpo_2-1718804422885.png

 

Result:

kymramosrpo_3-1718804459397.png

 

---

How about you? What's your suggestion?

v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Maybe you need to try combining.

combine-binaries_2a.png

Combine files (binaries) in Power BI Desktop - Power BI | Microsoft Docs

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

serpiva64
Solution Sage
Solution Sage

Hi,

right click on the column

select transform - text

serpiva64_0-1675246442003.png

 

and it opens

 

If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !

 

Hi, once you have all the binary contents, rather than combining them all, I 'd like to crate separate tables for each binary row because in my SharePoint folder I have different tables with totally different contents, rows and columns. How to do that please?

Anonymous
Not applicable

When i tried above solution then getting below error

 

Usinghal_0-1644480373271.png

 

The code for this step looks like this:

= Table.TransformColumns(#"Filtered Rows", {{"Content", Text.FromBinary}})

You can replace Text.FromBinary with the appropriate function like Excel.Workbook.

= Table.TransformColumns(#"Filtered Rows",{{"Content", Excel.Workbook}})

 Then it should return tables instead of garbled text.

that was what I needed, thanks

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.)

Combining Binary files:
I know how to do it by adding a custom column for
csv files =Csv.Document([Content])
or
Excel 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.

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:

https://learn.microsoft.com/en-us/powerquery-m/csv-document 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors