---
title: List.Difference – หาผลต่าง List
url: https://www.thepexcel.com/functions/power-query/list-functions/list-difference/
type: function-explainer
program: Power Query
syntax: "List.Difference(list1 as list, list2 as list, optional equationCriteria as any) as list"
date: 2025-12-03
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 3
  usefulness: 5
---

# List.Difference – หาผลต่าง List

> หาผลต่าง List

## คำอธิบาย

หาสมาชิกที่อยู่ใน List แรกแต่ไม่อยู่ใน List ที่สอง (Set Difference)

## Syntax

```excel
List.Difference(list1 as list, list2 as list, optional equationCriteria as any) as list
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| list1 | Yes | list |  | List ตั้งต้น |
| list2 | Yes | list |  | List ตัวลบ |

## ตัวอย่าง

### 1. Difference

```excel
List.Difference({1, 2, 3}, {2, 3})
```

**ผลลัพธ์:** `{1}`

เอาเฉพาะตัวที่มีใน List แรกแต่ไม่มีใน List สอง

## ฟังก์ชันที่เกี่ยวข้อง

- [List.Intersect – อินเตอร์เซกต์ List](https://www.thepexcel.com/functions/power-query/list-functions/list-intersect/)
- [List.RemoveItems – ลบสมาชิกที่กำหนดออกจาก List](https://www.thepexcel.com/functions/power-query/list-functions/list-removeitems/)

## แหล่งข้อมูลเพิ่มเติม

- [PowerQuery.how](https://powerquery.how/list-difference/) _(guide)_

---

_Source: [https://www.thepexcel.com/functions/power-query/list-functions/list-difference/](https://www.thepexcel.com/functions/power-query/list-functions/list-difference/)_
