Rearranges the order of fields in a record | จัดเรียงลำดับฟิลด์ใหม่ใน Record ตามที่ต้องการ
| อาร์กิวเมนต์ | ชนิด | ค่าเริ่มต้น | คำอธิบาย |
|---|---|---|---|
| record | record | The record containing the fields to reorder | |
| fieldOrder | list | List defining the new field sequence; unlisted fields maintain their original positions | |
| [missingField]ไม่บังคับ | nullable number | null | Optional parameter for handling missing fields |
[ ] = อาร์กิวเมนต์ที่ไม่บังคับ
Record.ReorderFields rearranges the order of fields in a Power Query record according to a specified sequence. Fields not listed in the new order maintain their original positions.
ฟังก์ชัน Record.ReorderFields ใช้สำหรับจัดเรียงลำดับฟิลด์ใน Record ตามลำดับที่กำหนด ฟิลด์ที่ไม่ได้ระบุในลำดับใหม่จะคงตำแหน่งเดิมไว้ เหมาะสำหรับการจัดระเบียบข้อมูลหรือเตรียมข้อมูลสำหรับการส่งออก ใช้ได้ดีกับการปรับโครงสร้างข้อมูลก่อนแสดงผลหรือส่งออกไปยังระบบอื่น
ใช้กับ List.Contains หรือ Text.Contains เพื่อให้หาเจอไม่ว่าจะพิมพ์เล็กหรือใหญ่
ใช้กับ Table.Distinct หรือ List.Distinct เพื่อมองว่า "Apple" กับ "apple" คือค่าซ้ำกัน
ใช้ในการ Merge Queries เพื่อให้ Key ที่เป็นตัวพิมพ์ต่างกันสามารถจับคู่กันได้
Moves OrderID and CustomerID to the front; Item and Price stay at the end
Reorganizes fields to prioritize email; Age stays at the end since it wasn't mentioned
Reorder fields to match required export format while keeping remaining fields in original order
Comparer.Ordinal สนใจตัวพิมพ์เล็ก/ใหญ่ (Case Sensitive) ดังนั้น "A" ไม่เท่ากับ "a" ส่วน Comparer.OrdinalIgnoreCase ไม่สนใจ (Case Insensitive)
ฟังก์ชันที่ผู้เขียนโยงไว้กับ Record.ReorderFields จัดกลุ่มตามหมวด · ชี้ที่ชื่อใดชื่อหนึ่ง แล้วฟังก์ชันที่ใช้คู่กันจะมีจุดทอง
Removes specified fields from a record | ลบฟิลด์ที่ระบุออกจาก Record
Record.SelectFields จะคืนค่า Record ใหม่ที่มีเฉพาะ Field ที่ระบุใน List เท่านั้น สามารถจัดการกับ Field ที่หายไปได้ด้วย option missingField
Record.TransformFields แปลงค่าในฟิลด์ที่ระบุของเรคอร์ดโดยใช้ฟังก์ชันแปลงค่า สามารถแปลงฟิลด์เดียวหรือหลายฟิลด์พร้อมกันได้ เหมาะสำหรับการทำความสะอาดข้อมูลและการแปลงประเภทข้อมูล
ยังไม่มีบทความที่เกี่ยวข้องกับฟังก์ชันนี้
Comments
อีเมลของคุณจะไม่ถูกเผยแพร่