Back to Blog
Excel

Excel Power Query for IT Managers

December 20, 2025
8 min read read
ULearn4Sure
Excel Power Query for IT Managers

How to use Power Query to automate your most tedious IT reporting tasks — license audits, asset inventory, and capacity planning.

Introduction

If you work in IT and spend any part of your week wrangling data exports from Active Directory, SCCM, ServiceNow, monitoring tools, or cloud consoles, Power Query will change how you work. It is built directly into Excel (and Microsoft 365), it requires zero coding, and it turns a 45-minute manual data-cleaning routine into a one-click refresh.

This guide walks through real IT scenarios where Power Query eliminates repetitive manual work. No abstract examples. Every step maps to data you actually deal with as a sysadmin, IT manager, or small business tech lead.

What Power Query Actually Does

Power Query is a data transformation engine inside Excel. You connect it to a data source like a CSV file, an Excel workbook, a folder of files, a database, or even a web page, and then define a series of transformation steps: remove columns, filter rows, split fields, merge tables, change data types, and more. Those steps are recorded and repeatable. The next time you need to process the same type of data, you just refresh the query and it applies every step automatically.

Think of it as a macro for data cleaning that does not break when your source format changes slightly. Power Query handles inconsistencies gracefully: extra spaces, mixed date formats, blank rows, merged cells. All the things that make raw data exports painful to work with manually.

How to access Power Query

In Excel for Microsoft 365 or Excel 2016 and later, go to the Data tab and look for 'Get Data' or 'Get & Transform Data.' That is Power Query. You can also use 'From Table/Range' to load data that is already in your spreadsheet into the Power Query editor.

Scenario 1: Cleaning an Active Directory User Export

You exported a list of all users from Active Directory using PowerShell or the AD admin console. The CSV has 30 columns, most of which you do not need. The DisplayName column contains 'LastName, FirstName' in some rows and 'FirstName LastName' in others. The LastLogonDate column is a mix of date formats, and some entries are blank because the user has never logged in. The Department column has trailing spaces, inconsistent capitalization, and a few entries that just say 'N/A'.

Power Query steps

  • Import the CSV using Data > Get Data > From File > From CSV. Power Query auto-detects delimiters and column types.
  • Remove unnecessary columns: select the columns you want to keep (SamAccountName, DisplayName, Department, LastLogonDate, Enabled), right-click, and choose 'Remove Other Columns.'
  • Clean the Department column: select it, go to Transform > Format > Trim (removes leading/trailing spaces), then Transform > Format > Capitalize Each Word. Replace 'N/A' values with null using Replace Values.
  • Standardize DisplayName: use 'Split Column by Delimiter' with a comma to separate last and first names, then add a custom column that concatenates them in your preferred format.
  • Fix LastLogonDate: change the column type to Date. Power Query handles most format variations automatically. Rows that cannot be parsed become null. These are your 'never logged in' accounts, which is useful information.
  • Filter out disabled accounts: click the dropdown on the Enabled column and uncheck 'FALSE.'
  • Load the cleaned result to a new worksheet.

The entire sequence takes about five minutes to build the first time. Every subsequent month when you pull a fresh AD export, you drop the new CSV in the same location and hit Refresh. Power Query applies every step automatically and gives you a clean, consistent dataset in seconds.

Scenario 2: Combining Multiple Monthly Ticket Exports

Your ticketing system exports data as one CSV per month. You need a consolidated view for quarterly reporting. Manually opening twelve files, copying data, checking for duplicate headers, and ensuring consistent formatting is tedious and error-prone.

Power Query steps

  • Place all monthly CSV files in a single folder.
  • In Excel, go to Data > Get Data > From File > From Folder. Point it at that folder.
  • Power Query shows a preview of all files. Click 'Combine & Transform Data.' It automatically detects the structure, skips duplicate header rows, and stacks all data into one table.
  • Add a Source column (Power Query does this by default) so you can still identify which file each row came from.
  • Apply any cleanup steps: standardize date columns, remove test tickets, normalize priority labels.
  • Load to a worksheet or directly to a PivotTable for reporting.

Next quarter, you drop the new month's files into the same folder and refresh. The query picks up the new files automatically. No copy-paste, no manual deduplication, no broken formulas.

Scenario 3: Transforming a CMDB Asset Dump for Management Reporting

Your CMDB export has everything: server names, IP addresses, OS versions, owner departments, warranty dates, and a dozen custom fields. Management wants a one-page summary showing server count by OS version, servers approaching warranty expiry, and department ownership distribution. The raw export has 2,000 rows and 40 columns with inconsistent OS naming: 'Windows Server 2019', 'Win2019', 'WS2019', and 'Windows Server 2019 Standard' all mean the same thing.

Power Query steps

  • Import the export and remove columns not needed for the summary.
  • Create a mapping table (a simple two-column Excel table) that maps every OS variation to a standardized name. Use Merge Queries to join the asset data with the mapping table, replacing the messy OS column with clean, consistent values.
  • Change the WarrantyExpiry column to Date type. Add a custom column that calculates days until expiry. Filter to show assets expiring within 90 days for the warranty alert section of the report.
  • Group By department to get server counts. Group By standardized OS to get version distribution.
  • Load each summary to a separate worksheet tab, ready for a PivotChart or direct inclusion in a slide deck.

Power Query Tips for IT Professionals

  • Name your query steps. Power Query auto-generates step names like 'Changed Type1' and 'Removed Columns2.' Right-click each step and rename it to something meaningful: 'Removed PII columns,' 'Standardized OS names,' 'Filtered active servers.' Future you will be grateful.
  • Use parameters for file paths. Instead of hardcoding a file path, create a Power Query parameter. This makes your workbook portable. Change the parameter when you move it to a new machine or share it with a colleague.
  • Append queries for historical tracking. Keep each month's import as a separate query, then create an Append query that combines them all. This lets you refresh individual months independently and maintain a clean audit trail.
  • Combine Power Query with PivotTables. Load your cleaned data to a Data Model and build PivotTables on top of it. When the source data updates, one Refresh All command updates everything: the query, the model, and every PivotTable and chart in the workbook.
  • Handle errors gracefully. When Power Query encounters a value it cannot convert (like text in a number column), it flags it as an error rather than crashing. Use 'Remove Errors' or 'Replace Errors' to handle these systematically rather than hunting through raw data for anomalies.

Conclusion

Power Query is the most underused tool in the IT professional's Excel toolkit. It eliminates the manual, repetitive data preparation work that consumes hours every week: cleaning exports, combining files, standardizing messy columns, and rebuilding reports from scratch each time the data refreshes.

The investment to learn it is small. If you can click through a menu and understand the concept of filtering and sorting, you can use Power Query. Start with one data source you clean manually on a regular basis. Build the query once, and let it do the work from that point forward. Once you experience the first one-click refresh that replaces 30 minutes of manual work, you will never go back.

About the Author

ULearn4Sure provides practical IT training in Azure, IT Operations, and Excel. With over 20 years of experience in enterprise IT infrastructure, I help professionals level up their skills with no-fluff, real-world training.

Learn More