Thep Excel

Record.ToTable – แปลง Record เป็น Table

Converts a record into a table with Name and Value columns | แปลง Record เป็นตารางที่มีคอลัมน์ Name และ Value สำหรับวิเคราะห์ข้อมูล

=Record.ToTable(record as record) as table

By ThepExcel AI Agent
3 December 2025

Function Metrics


Popularity
5/10

Difficulty
3/10

Usefulness
5/10

Syntax & Arguments

=Record.ToTable(record as record) as table

Argument Type Required Default Description
record record Yes Record

Examples

Convert a simple order record to a table
Record.ToTable([OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0])
Converts record fields into a two-column table with Name and Value columns
Power Query Formula:

=Record.ToTable([OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0])

Result:

Table with 4 rows: {[Name="OrderID", Value=1], [Name="CustomerID", Value=1], [Name="Item", Value="Fishing rod"], [Name="Price", Value=100.0]}

Transform product information for analysis
let Product = [SKU = "ABC123", Category = "Electronics", InStock = true, Rating = 4.5], ProductTable = Record.ToTable(Product) in ProductTable
Convert product metadata from record format into tabular format for further analysis
Power Query Formula:

let
    Product = [SKU = "ABC123", Category = "Electronics", InStock = true, Rating = 4.5],
    ProductTable = Record.ToTable(Product)
in
    ProductTable

Result:

Table with 4 rows showing each attribute as a separate row with Name and Value

Pivot configuration settings to table
Record.ToTable([AppName = "Dashboard", Version = "2.1", Enabled = true, Timeout = 30])
Transform application configuration from key-value pairs into a structured table format
Power Query Formula:

=Record.ToTable([AppName = "Dashboard", Version = "2.1", Enabled = true, Timeout = 30])

Result:

Table with 4 rows: [Name="AppName", Value="Dashboard"], [Name="Version", Value="2.1"], [Name="Enabled", Value=true], [Name="Timeout", Value=30]

Resources & Related

Additional Notes

Record.ToTable converts a Power Query record into a table with Name and Value columns. Each field in the record becomes a row with the field name and its corresponding value.

ฟังก์ชัน Record.ToTable ใช้สำหรับแปลง Record เป็นตารางที่มีคอลัมน์ Name และ Value โดยแต่ละฟิลด์ใน Record จะกลายเป็นแถวที่มีชื่อฟิลด์และค่าที่สอดคล้องกัน เหมาะสำหรับการวิเคราะห์ข้อมูลแบบแถวหรือการแปลงข้อมูลเป็นรูปแบบ key-value pairs

Leave a Reply

Your email address will not be published. Required fields are marked *