What is Binary Data Type in Power BI?

Cody Schneider9 min read

When you first start building reports, you mostly work with familiar data types like text, numbers, and dates. But every so often, you’ll import data into Power BI and see a column full of nothing but the word "Binary." This article will show you what the binary data type is, where it comes from, and - most importantly - how to transform it from a useless placeholder into a valuable and visual part of your report.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Demystifying the Binary Data Type

At its core, all computer data is stored in binary - a series of ones and zeros. This is the fundamental language of digital systems. While text, like the letter "A," or a number, like "95," can be represented by binary code, the binary data type you see in Power BI is a catch-all for complex information that doesn't fit neatly into simple text or numeric formats.

Think of it as raw, unprocessed file data. It could be anything:

  • An image file (like a JPEG, PNG, or GIF)
  • A PDF document
  • A compressed .zip file
  • Any other type of file that a database can store

Power BI sees this column and recognizes that it contains data, but it can't display it directly like a name or a sales figure. Instead, it labels it as "Binary," letting you know that there's something complex there that needs to be interpreted. Your job is to tell Power BI what that "something" is and how to display it.

Common Sources of Binary Data in Power BI

You’ll rarely create binary data yourself, it's almost always something you import from a source system. Understanding where it comes from is the first step in figuring out what to do with it.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

From Your Database (SQL and Similar)

This is the most common scenario. Many databases, like SQL Server, are designed to store more than just text and numbers. They have special data types to handle files. You'll often see column types like:

  • VARBINARY: Used for storing variable-length binary data, often for small to medium-sized files.
  • IMAGE: An older data type in SQL Server specifically for storing images.
  • BLOB (Binary Large Object): A general term used across many database systems for storing large chunks of binary data, like long videos or large documents.

For example, a company's product database might have a table with columns for Product Name, Price, and SKU. It could also have a ProductPhoto column with a VARBINARY(MAX) data type, where the actual JPEG image for each product is stored. When you connect Power BI to this table, the ProductPhoto column will appear as a Binary data type.

Web Sources and APIs

Another frequent source of binary data is when you're pulling data from web sources, particularly document repositories like SharePoint. When you connect to a SharePoint Folder connector, Power BI gives you a list of files. This list includes metadata like "File Name" and "Date Modified," but it also includes a column called "Content" that holds the actual file as binary data.

This is useful for situations like:

  • A folder of employee headshots for building an internal directory.
  • A repository of PDF invoices you want to link to in a financial report.
  • Marketing assets like logos and banners you want to display in a campaign performance dashboard.

Compressed Files

Sometimes, data is provided in a compressed format (like a ZIP or GZIP file) to save space. When you import a file like this through an API or web source, the entire compressed file contents may appear as a single binary object. To get to the actual data inside, you first need to decompress the binary object using Power Query's transformation tools.

Putting Binary Data to Work in Power Query

You can't do anything with a binary column in the Power BI report view. The magic happens in the Power Query Editor. This is where you transform the raw binary code into something Power BI can visualize. The most common goal is to convert binary data representing images into a format that can be displayed in your reports.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Converting Binary to Text with Base64

To display an image stored as binary data, you first need to convert it into a special text format called Base64. Base64 is a standard method for encoding binary data into a text string that can be easily embedded in web pages, emails, and - in our case - Power BI visuals.

Once encoded, you’ll add a special prefix to this text string. This prefix is a data URI, which tells the rendering engine, "The text string that follows is not just text, it's a Base64-encoded image, so please display it as such."

Step-by-Step Guide to Displaying Binary Images:

Let's walk through an example. Imagine you have a [ProductPhoto] column that contains binary data for your JPEGs.

  1. Open Power Query: From the Power BI report view, click on "Transform data" in the Home ribbon to open the Power Query Editor.
  2. Select your query: In the left pane, select the table containing your binary column.
  3. Add a Custom Column: Go to the "Add Column" tab and click "Custom Column."
  4. Write the M Formula: In the Custom Column dialog box, configure the following:
"data:image/jpeg,base64, " & Binary.ToText([ProductPhoto], BinaryEncoding.Base64)

Let's break down this formula:

  • Binary.ToText([ProductPhoto], BinaryEncoding.Base64): This is the core function. It takes your binary data from the [ProductPhoto] column and converts it into a Base64 text string.
  • "data:image/jpeg,base64, " & ... : This is the critical prefix. It tells Power BI that the data is a JPEG image encoded in Base64. If your images were PNGs, you would change this to "data:image/png,base64, ".

When you click "OK," you'll have a new column filled with a very long string of text. This is your usable image URL.

Setting the Data Category

You’re not done yet! You need to tell Power BI one more thing about this new column.

  1. Close & Apply: Click "Close & Apply" in the Power Query Editor to return to the report view.
  2. Select the Column: Go to the "Data" view (on the left sidebar) and select your table and the new ImageURL column you just created.
  3. Set Data Category: In the "Column tools" ribbon that appears at the top, find the "Data category" dropdown list and select Image URL.

This final step is what activates the column for visualization. Now, when you drag the ImageURL field into a Table, Matrix, or third-party visual like Simple Image, it will display the actual images instead of the long text string.

Why Does This Matter? Real-World Examples

Transforming binary data opens up a new level of interactivity and context for your reports.

Visual Product Catalogs

Instead of just showing tables with product names and sales figures, you can build a dynamic catalog. Imagine a report where you can see a picture of each product next to its sales performance, inventory levels, and profit margins. A stakeholder can instantly recognize a product without having to decipher a part number.

Interactive Employee Directories

For HR and internal communications, you can build a report from company data that includes employee headshots. Paired with a slicer, users can quickly filter by department and see all team members visually, helping new hires put names to faces.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Proof of Delivery or Quality Control Dashboards

In logistics or manufacturing, teams often take photos as proof of delivery or to document product defects. If this photo data is stored in a database, you can create reports where managers can see the photo evidence alongside order details or quality metrics, right in Power BI.

A Quick Note on Performance

While embedding images is incredibly powerful, it comes with a word of caution: performance. Storing a large number of high-resolution images as Base64 strings directly in your Power BI data model will significantly increase your PBIX file size. A larger file means slower loading times for you and for anyone viewing the published report.

Best Practices:

  • Resize Images: Before loading them into your database or source system, resize your images to be only as large as you need them to be in the report (e.g., 150x150 pixels for a thumbnail). Smaller image file sizes translate to a smaller binary footprint.
  • Use Standard URLs When Possible: If your images are hosted publicly on a web server, the best practice is to simply store the standard https:// web URL in your data model instead of the binary data itself. This keeps your model lean, as Power BI just references the image instead of embedding it. Only use the binary-to-Base64 method when your images aren't accessible via a simple web link.
  • Filter Unnecessary Data: In Power Query, filter your table to only include the products or items you actually need to report on before converting the binary column. Don't waste resources transforming images that will be filtered out of your final report anyway.

Final Thoughts

The Binary data type in Power BI might seem obscure at first, but it is your gateway to creating richer, more visually appealing reports. By using the Power Query editor, you can transform these abstract values into real-world objects like product photos or staff portraits, adding a layer of context that numbers and text alone can never achieve.

Doing these kinds of data preparation steps manually in Power Query works, but it takes time and introduces complexity your team has to manage. At Graphed , we've automated this entire process. You connect your data sources - like your product database or SharePoint folder - and simply ask in plain language for what you need. Instead of writing M-code to convert binary data, you could ask, "Show me a dashboard of top-selling products by revenue this month, including their product images," and get a live, interactive dashboard in seconds. Our AI handles the underlying data transformations for you, so you can focus on answering business questions, not wrestling with data types.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!