Converts a record into a table with Name and Value columns | แปลง Record เป็นตารางที่มีคอลัมน์ Name และ Value สำหรับวิเคราะห์ข้อมูล
=Record.ToTable(record as record) as table
=Record.ToTable(record as record) as table
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
| record | record | Yes | Record |
Record.ToTable([OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0])=Record.ToTable([OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0])
Table with 4 rows: {[Name="OrderID", Value=1], [Name="CustomerID", Value=1], [Name="Item", Value="Fishing rod"], [Name="Price", Value=100.0]}
let Product = [SKU = "ABC123", Category = "Electronics", InStock = true, Rating = 4.5], ProductTable = Record.ToTable(Product) in ProductTablelet
Product = [SKU = "ABC123", Category = "Electronics", InStock = true, Rating = 4.5],
ProductTable = Record.ToTable(Product)
in
ProductTable
Table with 4 rows showing each attribute as a separate row with Name and Value
Record.ToTable([AppName = "Dashboard", Version = "2.1", Enabled = true, Timeout = 30])=Record.ToTable([AppName = "Dashboard", Version = "2.1", Enabled = true, Timeout = 30])
Table with 4 rows: [Name="AppName", Value="Dashboard"], [Name="Version", Value="2.1"], [Name="Enabled", Value=true], [Name="Timeout", Value=30]
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