← 30 Days Excel Series
Day 14 of 30IntermediatePower Query

Day 14: Power Query — Advanced Transformations

5 questions · Excel Interview Preparation

Q1

What does "Unpivot Columns" do and when do you need it?

Unpivot transforms wide data (where categories are spread across multiple columns) into long/tidy data (one row per observation). Wide data: columns Jan | Feb | Mar | Apr, each with revenue values per customer. Long data: columns Customer | Month | Revenue. Long data is required for Pivot Tables, Power BI, and most analysis tools. In Power Query Editor: select the category columns (Jan, Feb, Mar...) → Transform → Unpivot Columns. A new "Attribute" column (containing the column names) and "Value" column are created.

💡 Interview tip: Unpivoting is one of the most commonly used Power Query features for real business data — most reports come in wide format but analysis needs long format.
Q2

How do you create a custom column in Power Query?

Add Column → Custom Column → enter a name and a formula in M language. Basic examples: combine columns: [FirstName] & " " & [LastName]. Conditional: if [Revenue] > 100000 then "High" else "Standard". Date extraction: Date.Year([OrderDate]). M language is case-sensitive and uses square brackets around column names. For simple column calculations, Custom Column is often more readable than adding a calculated column in Excel after loading.

💡 Interview tip: M language is case-sensitive and function names are capitalised differently from Excel — "Text.Upper" not "UPPER". Start with simple expressions and build up.
Q3

How do you handle errors in Power Query?

Errors in Power Query appear as red "Error" cells in the preview. To see the error: click the error cell to see the error message at the bottom. To handle errors: right-click the column header → Replace Errors → enter a replacement value (0, null, or a string). Alternatively, click the column → Transform → Replace Errors. Errors commonly occur when changing data type — e.g. changing a column to Number when some cells contain text. Fix the source data if possible; otherwise use Replace Errors.

💡 Interview tip: Do not load errors into Excel — they propagate into downstream calculations. Always resolve errors in Power Query before loading.
Q4

What is a Group By operation in Power Query?

Group By aggregates data — equivalent to a SQL GROUP BY or an Excel Pivot Table. Home → Group By → select the column(s) to group on → add aggregations (Sum, Count, Average, Min, Max of other columns). Example: group by Region and sum Revenue gives total revenue per region. The result is loaded as a summary table. Unlike a Pivot Table, the Group By result is a fixed table — it does not have the interactive drill-down of a Pivot Table but is useful for creating summary inputs for dashboards.

💡 Interview tip: Use Group By in Power Query when you need a clean summary table as the output — not an interactive Pivot Table.
Q5

How do you combine multiple files from a folder in Power Query?

Data → Get Data → From File → From Folder → select the folder. Power Query shows all files in the folder. Click "Combine & Transform". Power Query creates a sample file query, a function query, and a combined query that runs the same transformations on every file and stacks the results. This is the standard approach for combining 12 monthly CSV files into one annual dataset — every month, you just add the new file to the folder and click Refresh.

💡 Interview tip: Combine from folder is one of Power Query's most powerful features for recurring monthly/weekly reporting workflows. Knowing this in an interview is impressive.
← Day 13All DaysDay 15

Want 1:1 Excel coaching?

Join EVIKA Academy for live Excel training, real projects, and placement support in Delhi NCR.

Book Free Demo →
Best Data Analytics Course in Noida Delhi NCR | EVIKA ACADEMY