In this article, we will show you, How to connect Power BI to Text Files, and how to get data from text file to Power BI.
To demonstrate the same, we will load data from text file to Power BI, and generate a column chart.
How to Get Data from Text File to Power BI
Before we get started, Let us see the data present in the Employee Text File. From the below screenshot, you can see that it is just a normal text file. If you observe closely, the First row has the Column names
If you haven’t started the Power BI Desktop yet, Double click on the Power BI desktop to open. Once it is open, it looks like below screenshot. Please click on the Get Data hyperlink
If you are in the Power BI visualization page. Under the Home tab, Click the Get Data option and select the Text/CSV as we shown below. Or, select More option
Get Data from Text File to Power BI
When you select the More option, the following window will be shown. You can use this window to select your desired Data source. For now, let me select the Text/CSV Option and click Connect button
Once you click on the Connect button, a new window will be opened to select the Text File from our file system. For now, we are selecting the Employee.txt file as shown below
Please wait until the connection is established
Now you can see the preview of the data present in the text file.
Most of the time, Power BI will automatically pick the delimiter, and separate the columns. If this is not the case, then use the Delimiter option to change as per your requirement.
If you are satisfied with the Data and the data types then click Load button otherwise, click Edit button to make changes.
When you click Edit button, following window will be opened. Use this window to change the data as per your requirement.
Currently, we don’t want to make any changes to the data. So, let me click on the Load button
Now you can see all the Columns that are imported from the text file under the Fields section.
Let me create a Column chart using this data. I suggest you refer, Column Chart in Power BI article to understand the steps involved in creating it.
Thank You for Visiting Our Blog