Using first rows as headers
When working with unstructured data, there is no data structure defined and the schema has to be determined at the Power Query level. In the previous recipe, we saw how data type is detected, while in this one we will see how you can define columns' headers.
Getting ready
In this recipe, you need to download the following file in a local folder:
FactResellerSales2
CSV file
In this example, we will refer to the C:\Data
folder.
How to do it
Once you open your Power BI Desktop application, you are ready to perform the following steps:
- Click on Get Data and select the Text/CSV connector.
- Browse to your local folder where you downloaded the
FactResellerSales2
CSV file and open it. A window with a preview of the data will pop up; click on Transform Data. - The usual Power Query window will pop up and it is easy to note that this data needs to be cleaned because we do not have headers and the first row contains data...