Ravindra BagaleCourses & study guides मराठी Track your progress

6. Power Query Essentials

6.2 Power Query Editor Tour

Start with a problem

Shraddha opens the Power Query Editor for the first time. She cannot find the M code, the step list or the row count.

Explain simply

The editor has six areas: ribbon, Queries pane (left), data preview (centre), formula bar, Query Settings with Applied Steps (right) and the status bar (bottom).

Show the data

Area Where What you check there
Queries pane Left Which query you are editing
Formula bar Above the grid M code of the selected step
Applied Steps Right List of recorded steps
Status bar Bottom Column and row count

About this data: This table uses columns: Area, Where, What you check there. This table uses columns: Column, Valid, Empty. This table uses columns: Area, Purpose. This table uses columns: Wrong result, Reason, Correction. Values shown are the lesson examples already on this page (not a new dataset).

Fictional sample data. Practice file: pq_raw_pune_export.csv (source: src/practice/).

Demonstrate

  1. Open the raw Pune query from 6.1 (Home › Transform data).
  2. Tick View › Formula Bar. Click the Removed Top Rows step.

    Your result should look like this:

    Formula bar shows
    = Table.Skip(Source, 2)
  3. Look at the status bar at the bottom-left.

    Your result should look like this:

    Status bar text (after Promoted Headers)
    4 COLUMNS, 6 ROWS
  4. Tick View › Column quality. Read the bar under Order Date.

Show the result

Your result should look like this (fictional sample):

Column Valid Empty
Order Date 67% 33% (2 of 6 rows: BLK-404 and Total)
Store 100% 0%

Explain what happened

Each area answers one question: which query, which step, what code, how many rows. Column quality counts blank cells as Empty: BLK-404 (date to fill down) and the Total row (to remove).

Explore further

  • Turn on Monospaced and Show whitespace to see trailing spaces such as "Kothrud ".

Detailed reference for this lesson:

Area Purpose
Ribbon Tabs: Home, Transform, Add Column, View, Tools, Help
Queries pane (left) List of all queries (tables, functions, parameters). Right-click for Duplicate, Reference, Enable load, Group
Data preview (centre) Preview of the data (not all rows). Column header icons show the data type (ABC = text, 123 = whole number, 1.2 = decimal, calendar = date)
Formula bar Shows the M code of the selected step (switch on via View › Formula Bar)
Query Settings pane (right) Query Name and the list of Applied Steps
Status bar Column/row counts and "Column profiling based on top 1000 rows"

Ravindra Bagale's Tip

A common mistake is working without the formula bar and the data preview tools switched on. Turn on the Formula bar and Column quality/distribution/profile in the View tab. Seeing the M code of each step is the fastest way to learn and debug. Clear?

Fix common mistakes

Wrong result Reason Correction
No formula bar Hidden by default View › Formula Bar
Applied Steps missing Query Settings pane closed View › Query Settings
Profile numbers look perfect but data is wrong Profiling uses top 1000 rows Status bar › Column profiling based on entire data set

Practise independently

Practice task

Which area shows Table.PromoteHeaders(...), and when?

Hints
  • Select a step.
Solution

The formula bar, when the Promoted Headers step is selected in Applied Steps.

Think like a professional

Reading the formula bar for every step is the fastest way to learn M and debug other people's queries.

Ravi Sir's Cards for this lesson

मराठी cards