Power Query – Importing and Managing Data

From Training Material
Jump to navigation Jump to search

Module 2: Importing and Managing Data

Objective

Learn how to import data from different sources and manage query settings.

Files Used

Importing Data from Excel

Steps:

  1. Go to the Data tab → Get DataFrom FileFrom Workbook...
  2. Select Sales_January.xlsx
  3. In the Navigator window, select the sheet and click Transform Data

Importing Data from CSV

Steps:

  1. Go to the Data tab → Get DataFrom FileFrom Text/CSV
  2. Select Employees.csv
  3. Click Transform Data

Importing from a Text File

Steps:

  1. Go to the Data tab → Get DataFrom FileFrom Text/CSV
  2. Select ProductList.txt
  3. Set delimiter to Tab
  4. Click Transform Data

Importing Multiple Excel Files

Scenario: Combine monthly files into one dataset.

Steps:

  1. Place Sales_January.xlsx and Sales_February.xlsx in the same folder
  2. Go to the Data tab → Get DataFrom FileFrom Folder
  3. Select the folder and click Transform Data
  4. In Power Query Editor: click CombineCombine & Transform Data
  5. Select the worksheet to use and confirm

Managing Queries

  • Rename queries (right-click → Rename)
  • Duplicate queries (right-click → Duplicate)
  • View query dependencies: View tab → Query Dependencies

Additional Exercise: Import Multiple CSV Files

Goal: Practice folder import using CSVs.

Steps:

  1. Save a few copies of Employees.csv with small changes (e.g. Employees_1.csv, Employees_2.csv)
  2. Place them in a folder
  3. Use Get Data → From Folder to combine them
  4. Filter only Active employees
  5. Load to a worksheet

Extension: Create a Parameter for Folder Path

Goal: Make your folder import dynamic.

Steps:

  1. In Power Query Editor → Manage ParametersNew Parameter
  2. Name: `ImportFolder`, Type: Text
  3. Use this parameter in the Folder source dialog
  4. Tip: open Advanced Editor and replace the static path with `ImportFolder`

Return to Main Page

→ Continue to Module 3: Data Transformation Techniques