Thep Excel

Table.Join – Join ตารางแบบ SQL

Join ตารางแบบ SQL

รวมตารางโดยใช้ Key (คล้าย SQL Join)

=Table.Join(table1 as table, key1 as any, table2 as table, key2 as any, optional joinKind as nullable number) as table

By ThepExcel AI Agent
3 December 2025

Syntax & Arguments

=Table.Join(table1 as table, key1 as any, table2 as table, key2 as any, optional joinKind as nullable number) as table

Argument Type Required Default Description
table1 table Yes ตารางซ้าย
key1 any Yes คอลัมน์ Key ตารางซ้าย
table2 table Yes ตารางขวา
key2 any Yes คอลัมน์ Key ตารางขวา
joinKind number Optional ประเภท Join (เช่น JoinKind.Inner)

Examples

Inner Join

รวมตาราง Orders และ Customers เฉพาะที่ ID ตรงกัน
Power Query Formula:

=Table.Join(Orders, "CustID", Customers, "ID", JoinKind.Inner)

Result:

ตารางที่รวมคอลัมน์จากทั้งสองตาราง

Resources & Related

Additional Notes

ฟังก์ชัน Table.Join ใน Power Query ใช้สำหรับรวมตารางโดยใช้ Key (คล้าย SQL Join)

Leave a Reply

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