Adding a column from examples
Adding a 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 all columns. Let us have a quick look at this feature by example.
Using the Chapter
5
, Common
Data
Preparation
Steps
, Added Custom
Columns.pbix
sample file from the previous section, we want to extract the usernames of the customers from their EmailAddress column, while the email structure is UserName@adventure-works.com
, from the Customer table.
You can download the sample file from here:
https://github.com/PacktPublishing/Expert-Data-Modeling-with-Power-BI-Second-Edition...