Adding custom columns
Once you have become more confident with Power Query M code, you can also enrich data content by writing formulas and expressions directly thanks to the custom columns feature. In this recipe, you will see an example of how to browse this section and create columns with calculations that are not available in the form of built-in features in the Power Query UI.
Getting ready
For this recipe, you need to download the FactInternetSales
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
FactInternetSales
CSV file and open it. The following window with a preview of the data will pop up; click on Transform Data: - Imagine you want to calculate how many days have passed...