Adding new features to the ML queries in Power Query
Back in Power Query, you will now add the new features that were discussed in this chapter to the ML queries. Looking through the list, Month Num is the only one that will need some custom M code to convert Incident Date to a month. You’ve already done this in the previous chapter, so you can reuse the Date.Month([Incident Date])
M code for a custom column.
Starting with Predict Damage highlighted in the group ML queries, follow these steps:
- Double-click on Remove Other Columns under Applied Steps.
- Add each of the features in the table shown in Figure 5.16 (including Incident Date to be converted into Month Num).
Your screen should look like this:
Figure 5.16 – Select the columns to be added to the ML query
- Click OK.
- Phase of Flight, Sky, Precipitation, and Effect on Flight all have some empty values. Replace the null (empty) values with the text value
empty...