Adding column from examples
Adding column from examples is a brilliant feature of Power Query. It not only helps speed up the development process but also helps developers learn Power Query. The idea is that we can create a new column from sample data by entering the expected values in a sample column. Power Query then guesses what sort of transformation we are after and generates the expressions needed to achieve the results we entered manually. We can create new columns from selected columns or by all columns. Let's have a quick look at this feature by example.
We want to extract the usernames of the customers from their EmailAddress
column, while the email structure is [email protected]
, from the Customer
table. The following steps show how we can achieve this by adding a column from examples:
- Select the
Customer
table from the Queries pane. - Select the
EmailAddress
column. - Click the Column From Examples drop-down button from the Add Columns tab...