---
title: Record.RemoveFields – Remove fields from a record
url: https://www.thepexcel.com/functions/power-query/record-functions/record-removefields/
type: function-explainer
program: Power Query
syntax: "Record.RemoveFields(record as record, fields as any, optional missingField as nullable number) as record"
date: 2025-12-03
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 3
  usefulness: 5
---

# Record.RemoveFields – Remove fields from a record

> Remove one or more fields from a record | ลบฟิลด์หนึ่งหรือหลายฟิลด์ออกจาก Record

## คำอธิบาย

Removes specified fields from a record | ลบฟิลด์ที่ระบุออกจาก Record

## Syntax

```excel
Record.RemoveFields(record as record, fields as any, optional missingField as nullable number) as record
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| record | Yes | record |  | The input record to modify |
| fields | Yes | any |  | Field name(s) to remove - either a single text value or a list of field names |
| missingField | No | nullable number | null | Optional parameter for handling missing fields |

## ตัวอย่าง

### 1. Remove a single field

```excel
Record.RemoveFields([CustomerID = 1, Item = "Fishing rod", Price = 18.00], "Price")
```

**ผลลัพธ์:** `[CustomerID = 1, Item = "Fishing rod"]`

Removes the Price field from the record, keeping CustomerID and Item

### 2. Remove multiple fields at once

```excel
Record.RemoveFields([CustomerID = 1, Item = "Fishing rod", Price = 18.00], {"Price", "Item"})
```

**ผลลัพธ์:** `[CustomerID = 1]`

Removes both Price and Item fields, leaving only CustomerID

### 3. Use in a let-in expression for data cleanup

```excel
let
    Customer = [ID = 1, Name = "Alice", TempID = "ABC", ProcessFlag = true],
    Cleaned = Record.RemoveFields(Customer, {"TempID", "ProcessFlag"})
in
    Cleaned
```

**ผลลัพธ์:** `[ID = 1, Name = "Alice"]`

Remove temporary working fields before returning the final record

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

- [Record.SelectFields – เลือก Field ที่ต้องการจาก Record](https://www.thepexcel.com/functions/power-query/record-functions/record-selectfields/)
- [Record.AddField – Add a field to a Power Query record](https://www.thepexcel.com/functions/power-query/record-functions/record-addfield/)
- [Record.RenameFields – Rename fields in a record](https://www.thepexcel.com/functions/power-query/record-functions/record-renamefields/)
- [Record.ReorderFields – จัดลำดับ Field](https://www.thepexcel.com/functions/power-query/record-functions/record-reorderfields/)
- [Record.TransformFields – แปลงค่าในฟิลด์เรคอร์ด](https://www.thepexcel.com/functions/power-query/record-functions/record-transformfields/)
- [Table.RemoveColumns – ลบคอลัมน์ที่ไม่ต้องการจาก table](https://www.thepexcel.com/functions/power-query/table-functions/table-removecolumns/)

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

- [Microsoft Learn: Record.RemoveFields](https://learn.microsoft.com/en-us/powerquery-m/record-removefields) _(official)_
- [PowerQuery.how](https://powerquery.how/record-removefields/) _(guide)_

---

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