From the course: Enhancing Excel with Generative AI Tools

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Solution: Data preparation for AI

Solution: Data preparation for AI

(upbeat music) - [Narrator] How did your first challenge go? Let's dive into the solution and explore how we can unpivot data in Excel using Power Query and then convert that data set into markdown format. Start by opening the file name Chapter One Challenge. The first step is to consolidate state populations into a single column to help with AI readability. Load your data set into Power Query by clicking on any cell within this data set. Then we'll navigate to the Data tab on the ribbon and select From Table/Range. This action will convert your range into a table and open the Power Query editor. Click Okay. Once you're in Power Query, it's time to unpivot our columns. To do this, I will select the Stay column. I will right click and choose Unpivot Other Columns. This will transform your dataset, consolidating all of our years into two new columns. I'm going to rename them Year and Population, respectively. Hit Enter to confirm your selection. After we've completed this unpivot…

Contents