Thep Excel

Record.FromTableConvert a table into a record

Returns a record from a table containing field names and corresponding values | แปลงตารางที่มีชื่อฟิลด์และค่าเป็น Record

fx
=Record.FromTable(table) as record

ความนิยม5/10
ความยาก4/10
ประโยชน์5/10

อัปเดต 4 December 2025

Syntax & Arguments

อาร์กิวเมนต์ ชนิด คำอธิบาย
table table A table containing records with Name and Value columns where each row’s Name becomes a field name and Value becomes the field value

Additional Notes

Record.FromTable converts a structured table into a single record in Power Query. The table must contain Name and Value columns that define field names and their corresponding values.

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

Examples

Convert a Name-Value table to a recordlet Source = Table.FromRecords({ [Name = "CustomerID", Value = 1], [Name = "Name", Value = "Bob"], [Name = "Phone", Value = "123-4567"] }), Result = Record.From…

Transforms a structured table into a single record where each row's Name becomes a field and Value becomes the field value

fx
let
Source = Table.FromRecords({
[Name = "CustomerID", Value = 1],
[Name = "Name", Value = "Bob"],
[Name = "Phone", Value = "123-4567"]
}),
Result = Record.FromTable(Source)
in
Result

ผลลัพธ์[CustomerID = 1, Name = "Bob", Phone = "123-4567"]
Transform dynamic Name-Value pairslet Data = Table.FromRecords({ [Name = "FirstName", Value = "Alice"], [Name = "LastName", Value = "Smith"], [Name = "Email", Value = "alice@example.com"] }), Re…

Build a record dynamically from a table structure, useful for pivoting data from rows to a single record object

fx
let
Data = Table.FromRecords({
[Name = "FirstName", Value = "Alice"],
[Name = "LastName", Value = "Smith"],
[Name = "Email", Value = "alice@example.com"]
}),
Result = Record.FromTable(Data)
in
Result

ผลลัพธ์[FirstName = "Alice", LastName = "Smith", Email = "alice@example.com"]
Convert unpivoted data to record formatlet Source = Table.FromRecords({[Name = "Jan", Value = 100], [Name = "Feb", Value = 150], [Name = "Mar", Value = 120]}), Record = Record.FromTable(Source) in Re…

Convert monthly data from a long format table into a record with months as fields

fx
let
Source = Table.FromRecords({[Name = "Jan", Value = 100], [Name = "Feb", Value = 150], [Name = "Mar", Value = 120]}),
Record = Record.FromTable(Source)
in
Record

ผลลัพธ์[Jan = 100, Feb = 150, Mar = 120]

Resources & Related

ฟังก์ชันที่ผู้เขียนโยงไว้กับ Record.FromTable จัดกลุ่มตามหมวด · ชี้ที่ชื่อใดชื่อหนึ่ง แล้วฟังก์ชันที่ใช้คู่กันจะมีจุดทอง

ฟังก์ชันนี้Record.FromTableRecord functions
Record functions (2)
Record.ToList

แปลง Record เป็น List ของค่าข้อมูล

Record.ToTable

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

Comments

อีเมลของคุณจะไม่ถูกเผยแพร่