And, you want the resulting table to look like this:

Let’s go through the query formula steps to change the original table so that the values in the ProductName column are proper case.

Advanced query using Advanced Editor example

To clean up the original table, you use the Advanced Editor to create query formula steps. Let’s build each query formula step to show how to create an advanced query. The complete query formula steps are listed below. When you create an advanced query, you follow this process:

Step 1 – Open Advanced Editor

  1. In the POWER QUERY ribbon tab, choose From Other Sources > Blank Query.
  2. In Query Editor, choose Advanced Editor.
  3. You will see the Advanced Editor.

Step 2 – Define the original source

In the Advanced Editor:

  1. Use a let statement that assigns Source = Excel.CurrentWorkbook() formula. This will use an Excel table as the data source. For more information about the Excel.CurrentWorkbook() formula, see Excel.CurrentWorkbook.
  2. Assign Source to the in result.
  3. Your advanced query will look like this in the Advanced Editor.
  4. To see the results in a worksheet:
    1. Click Done.
    2. In the Query Editor ribbon, click Close & Load.

The result looks like this in a worksheet:

Step 3 – Promote the first row to headers

To convert the values in the ProductName column to proper text, you first need to promote the first row to become the column headers. You do this in the Advanced Editor:

  1. Add a #'First Row as Header' = Table.PromoteHeaders() formula to your query formula steps and refer to Source as the data source. For more information about the Table.PromoteHeaders() formula, see Table.PromoteHeaders.
  2. Assign #'First Row as Header' to the in result.

The result looks like this in a worksheet:

Step 4 – Change each value in a column to proper case

Power Bi Functions List

To convert each ProductName column value to proper text, you use Table.TransformColumns() and refer to the 'First Row as Header” query formula step. You do this in the Advanced Editor:

  1. Add a #'Capitalized Each Word' = Table.TransformColumns() formula to your query formula steps and refer to #'First Row as Header' as the data source. For more information about the Table.TransformColumns() formula, see Table.TransformColumns.
  2. Assign #'Capitalized Each Word' to the in result.

The final result will change each value in the ProductName column to proper case, and looks like this in a worksheet:

Microsoft Query Function List In Java

With the Power Query Formula Language you can create simple to advanced data queries to discover, combine and refine data. To learn more about Power Query, see Microsoft Power Query for Excel Help.