Merging columns
Just like the previous scenario, there are often situations where you need to merge columns to achieve the desired format. For example, depending how date data is stored, you may need to merge the [Day]
, [Month]
, and [Year]
columns to achieve a singular Date
column. In the following figure, we can see an example description and configuration of how you might do this using the prebuilt function of Merge Columns in Power Query:
Figure 4.12 – The drop-down menu above the Merge Columns function (left) and a close-up of the UI for the Merge Columns function (right)
To use the Merge Columns function, follow these steps:
- Select the columns you would like to merge.
- Select the Merge Columns function, which can be located on the Home or Transform tab in the ribbon toolbar.
- In the Merge Columns configuration window, you can select a separator to sit between the merged values. As we are working with dates, we can select Custom...