Using the Power Query Conditional Columns functionality is a great way to add new columns to your query that follow logical if/then/else statements. This concept of if/then/else is common across many programming languages, including Excel formulas. Let's review a real-world scenario where you would be required to do some data cleansing on a file before it can be used. In this example, you will be provided a file of all the counties in the United States, and you must create a new column that extracts the state name from the county column and places it in its own column:
- Start by connecting to the FIPS_CountyName.txt file that is found in the book files using the Text/CSV connector.
- Launch the Power Query Editor, and start ...