Home › Power BI › Automatically Detect Data Types in Power BI
Power BI · May 15, 2019 · 2 MIN READ

Automatically Detect Data Types in Power BI

In Power BI Desktop, we can automatically detect data types of the fields we are importing. This is useful in that we don’t need to go through every field and define its type. This feature can be turned on and off. Let’s go through an example of how to use it.

In Power BI, go to File->Options and Settings->Options:

Select Data Load, and under Type Detection you will see Automatically detect column types and headers for unstructured sources:

Power BI will now guess what the importing column type is. Now, let’s play with some data. Click on Enter Data:

Let’s type in some data, 4 columns. Power BI should be able to guess these columns:

  • Customer Name (Text)
  • Revenue (Int)
  • Date Added (Date)
  • Active (Int)

Click OK:

In the Power Query Editor, we see a step has been added after our import – Changed Type. Our data types have been set:

On clicking Advanced Editor, we see the data types have been changed:

What if our last column was actually a true/false:

In this case, Power BI sets it to a logical type:

You may want to override the default type it sets, for example, our Revenue may be a decimal number.

Let’s uncheck the option to automatically detect the data type. Now if we import another set of data:

We see the Changed Types step is not there, and Power BI does not try to detect the data type:

We can see each field has defaulted to Text:

 

Carl de Souza
Keep learning. Keep building.

Explore AI, agents & Microsoft technology.

I share practical ideas, tutorials, and videos about AI, AI agents, Microsoft technologies, and the Power Platform.

Subscribe on YouTube →
Carl de Souza Enterprise Architect at Microsoft · AI Technology Expert

Leave a Reply

Your email address will not be published. Required fields are marked *

Carl de Souza
KEEP LEARNING. KEEP BUILDING.

Explore AI, agents & Microsoft technology.

I share practical ideas, tutorials, and videos about AI, AI agents, Microsoft technologies, and the Power Platform.