Open In App

Data types in Power BI

Last Updated : 02 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Data types are basic building blocks of our dataset. They define what kind of information is stored in each column making it easier to organize and analyze your data. Power BI supports different data types each made for a specific purpose. In this article, we will understand them one by one with examples:

DATATYPE

DESCRIPTION

EXAMPLE

Decimal number

Decimal data types store numbers with decimal points. They are used for measurements, financial figures and other precise calculations.

To calculate total charges of a product including tax (as a percentage) the numbers are usually not whole numbers.

Decimal

Fixed decimal number

It stores numbers with exactly four digits after the decimal point. Good for very precise values.

Lets say we want to list the heights of all the students in a classroom. 2 decimal points of accuracy shall be enough.

decimal-point

Whole number

These data types store non-decimal numbers and are used for counting or indexing purposes.

Think of product IDs, employee numbers or serial numbers.

whole

Percentage

It stores numbers as percentages.

We use percentage in marks obtained in a test, composition of a product, relative humidity, etc.

Percentage

Date/Time

A Date/Time value is a combination of both date and time and represented as a Decimal number. The time component is stored as a fraction of 1/300 seconds (equivalent to 3.33 milliseconds) or as multiples of this fraction.

For tracking and visualizing events or transactions with both date and time components like order timestamps.

Date

It only stores the data without time.

Used to represent calendar dates without time information used for date-based analysis like daily sales.

Date

Time

It only stores the time of the day without date.

Applied when you need to work with times of day like in measuring response times.

Time

Date/Time/Timezone

It stores date and time with timezone information. Time is shown the same no matter where you open the report.

Used for working with date and time data that includes timezone information like for international reporting.

Duration

Duration stores the amount of time between two events.

Used to measure the length of time intervals, like time spent on tasks or project durations.

Duration

Text

The Text data type stores textual information like words , letters , numbers and special characters as text. The maximum limit for string length is approximately 32,000 Unicode characters.

Whether you're working with product names, customer addresses or employee names the Text data type is used.

Text

True/False (Boolean)

Boolean data types can have one of two values: True or False. They are used in conditional expressions and allow you to filter data based on specific conditions.

For representing binary, yes/no or true/false data, used in filtering or flagging records.

Binary

The Binary data type is used to store binary data such as images, documents or any non-textual information. Used for purposes like document management and retrieval.

Used for storing binary data, like images, documents or other non-text data in a binary format.

How to Detect Data Types in Power BI

When you load data into Power BI from sources like Excel, CSV or databases Power BI automatically detects and assigns data types to each column. You can do this in the Power Query Editor by going to Home > Transform Data. In the editor each column header displays a small icon that indicates the current data type.

Screenshot-(9)

In the image above you can see columns with Date and Time icons which means Power BI has automatically assigned them the correct types. If you want to change a data type simply click the icon next to the column name and a dropdown will appear with various options like Decimal Number, Whole Number, Date/Time, Text and more. You can also change the data type from the Modeling tab in the report view by selecting a field from the Fields pane and using the “Data type” dropdown.

How to Change Data Types in Power BI

When you bring data into Power BI it usually tries to figure out the best data type for each column. However it doesn't always get it right especially if your data is inconsistent. If Power BI misinterprets the data type you can change it manually. There are two main ways to do this: using the Power Query Editor or using DAX formulas.

1. Changing Data Types Using Power Query Editor

To change the data type of a column using the Power Query Editor.

  • Open Power BI report and go to the "Home" tab. Click on "Edit Queries" to open Query Editor.
  • In Query Editor select the column you want to change. Then go to the "Transform" tab and choose a new data type from the "Data Type" dropdown menu.
  • Make sure your data fits the new data type. If there are any issues the editor will prompt you to fix them.
  • After making your changes click "Close and Apply" to save everything and load the updated data back into Power BI.
  • Finally check the new data type in the Data View to make sure it matches your reporting and visualization needs.

Screenshot-(9)

Capture

2. Converting Data Types Using DAX

In Power BI you can use DAX formulas to convert or cast data from one data type to another. DAX provides several functions to help you achieve this. Here are some commonly used functions for data type conversion and casting in Power BI DAX:

Function

Purpose

VALUE()

change text into a number

FORMAT()

Change a value into text with a specific format like currency or date

DATEVALUE()

Turns a text date like "01/01/2025" into a real data

TIMEVALUE()

turns a text time like "12:30 PM" into a real time

INT()

Rounds a number down to the nearest whole number

IF()

Checks a condition and gives one result if it's true and another if it's false

These DAX functions allow you to manipulate data types and perform explicit conversions or casting when needed for your calculations, measures and visualizations in Power BI. By knowing how these data types work you use them and convert raw data into useful insights for better decisions.


Next Article

Similar Reads