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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
KHANOS123
New Member

import files .dat

how to import files by .data. In my attempts, the best I managed was to import csv files, but the result is as follows. I can't duplicate columns to configure the file.

 

KHANOS123_0-1731671009361.png

 

3 REPLIES 3
Ray_Minds
Continued Contributor
Continued Contributor

Hi @KHANOS123 

Power BI cannot directly read or import files with a .data extension.
To handle this we can convert .data files into  common format like CSV or Excel, which Power BI can handle.

 

Here's a step-by-step guide

 

1.Convet .data file to CSV, 
- Open the .data file in a text editor (like Notepad or any code editor).
- Save the file as a CSV (Comma-Separated Values) file. Ensure that the columns are separated by commas and each row is on a new line.

 

2.Import CSV File: 
-Use Power BI and import the CSV file.

 

3.Duplicate Columns in Power Query Editor:
-In the Power Query Editor, select the column you want to duplicate.
-Right-click on the column header and select "Duplicate Column".

 

4.Load Data:
-Once you've made the necessary changes, click "Close & Load" to load the data into Power BI



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

Anonymous
Not applicable

Thanks for the reply from KHANOS123 , please allow me to provide another insight:

Hi, @KHANOS123 

The method I have found to be most effective involves first saving the file as a .txt document, followed by importing it to the desktop:

1.Open the date file using Notepad, then save it as a .txt file.

vlinyulumsft_0-1731909016345.png

vlinyulumsft_1-1731909016346.png

2.Next, import the file on the desktop using the text/csv format.

vlinyulumsft_2-1731909050806.png

3.Below is my sample data:

vlinyulumsft_3-1731909050808.png

vlinyulumsft_4-1731909067360.png

This is the final result, which I hope meets your requirements.

vlinyulumsft_5-1731909067361.png

vlinyulumsft_6-1731909081025.png

4.For further considerations regarding this method, please refer to:

Power Query Text/CSV connector - Power Query | Microsoft Learn
 

Please find the attached pbix relevant to the case.

 
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
 

Best Regards,

Leroy Lu

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

dk_dk
Super User
Super User

Hi @KHANOS123 

It would help to know what is inside your .dat file. Can you view it in a text editor?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors