---
title: Text.Proper – แปลงเป็นตัวพิมพ์ใหญ่ต้นคำ
url: https://www.thepexcel.com/functions/power-query/text-functions/text-proper/
type: function-explainer
program: Power Query
syntax: "Text.Proper(text as nullable text, optional culture as nullable text) as nullable text"
date: 2025-12-03
updated: 2025-12-23
scores:
  popularity: 7
  difficulty: 2
  usefulness: 7
---

# Text.Proper – แปลงเป็นตัวพิมพ์ใหญ่ต้นคำ

> แปลงอักษรตัวแรกของทุกคำเป็นตัวพิมพ์ใหญ่ (Title Case) และส่วนที่เหลือเป็นตัวพิมพ์เล็ก

## คำอธิบาย

แปลงอักษรตัวแรกของทุกคำเป็นตัวพิมพ์ใหญ่ (Title Case) และส่วนที่เหลือเป็นตัวพิมพ์เล็ก

## Syntax

```excel
Text.Proper(text as nullable text, optional culture as nullable text) as nullable text
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| text | Yes | text |  | ข้อความต้นฉบับ (nullable text) ที่ต้องการแปลงเป็น Title Case |
| culture | No | text | null | รหัสภาษา (culture code) เช่น "en-US" หรือ "th-TH" สำหรับใช้กฎการแปลงอักษรตามภาษาที่ระบุ ถ้าไม่ระบุจะใช้ culture เริ่มต้นของระบบ |

## ตัวอย่าง

### 1. แปลงชื่อบุคคลพื้นฐาน

```excel
= Text.Proper("john doe")
```

**ผลลัพธ์:** `"John Doe"`

ข้อความ "john doe" ทั้งตัวพิมพ์เล็กจะถูกแปลงเป็น "John Doe" โดยตัวแรกของแต่ละคำกลายเป็นตัวพิมพ์ใหญ่

### 2. แปลงข้อความที่มีตัวพิมพ์ใหญ่ปนกัน

```excel
= Text.Proper("tHE QUICK BrOWn fOx")
```

**ผลลัพธ์:** `"The Quick Brown Fox"`

ไม่ว่าอินพุตจะมีตัวพิมพ์ใหญ่/เล็กปนกันแบบไหน ผลลัพธ์จะเป็น Title Case ที่สอดคล้องกันเสมอ

### 3. จัดรูปแบบชื่อสินค้า

```excel
= Text.Proper("laptop computer 15 inch hd display")
```

**ผลลัพธ์:** `"Laptop Computer 15 Inch Hd Display"`

ใช้สำหรับจัดรูปแบบชื่อสินค้า โดยตัวแรกของแต่ละคำจะเป็นตัวพิมพ์ใหญ่ (ทั้ง "Hd" แม้จะเป็นตัวย่อ)

### 4. ใช้ใน Table Transformation

```excel
= Table.TransformColumns(
    Source,
    {{"CustomerName", each Text.Proper(_), type text}}
  )
```

**ผลลัพธ์:** `ทุกชื่อใน CustomerName column จะถูกแปลงเป็น Title Case (เช่น "john smith" -> "John Smith")`

ในสถานการณ์จริง เรามักใช้ Text.Proper กับ Table.TransformColumns เพื่อแปลงข้อมูลหลายแถวพร้อมกัน ตัวอักษร underscore (_) แทนแต่ละค่าในคอลัมน์

## หมายเหตุเพิ่มเติม

- ใช้ Text.Proper เพื่อ normalize ชื่อบุคคล ชื่อสถาน ชื่อสินค้า ให้เป็นรูปแบบมาตรฐาน

- ถ้าต้องการแปลงคอลัมน์ทั้งหมด ใช้ Table.TransformColumns คู่กับ Text.Proper เพื่อประสิทธิภาพที่ดี

- ระวังกับ apostrophe ในข้อความ เพราะ Text.Proper ถือว่าเป็นตัวแยกคำ อาจทำให้ผลลัพธ์ไม่เป็นไปตามที่คาดหวัง

- ถ้าต้องการ sentence case (ตัวแรกของประโยคเป็นตัวพิมพ์ใหญ่เท่านั้น) ให้ใช้ Text.Proper แล้วรวมกับ Text.Lower แล้ว substring technique

- ใช้ culture parameter เมื่อทำงานกับข้อมูลหลายภาษา เพื่อให้การแปลงอักษรถูกต้องตามกฎของแต่ละภาษา

## คำถามที่พบบ่อย

**Q: Text.Proper กับตัวเลขใน text จะทำอะไร?**

ตัวเลขจะไม่เปลี่ยนแปลง Text.Proper จะเปลี่ยนแค่ตัวอักษรเท่านั้น เช่น "product 2024" จะกลายเป็น "Product 2024"

**Q: ถ้า input เป็น null จะเกิดอะไร?**

ถ้า input text เป็น null ผลลัพธ์ก็จะเป็น null ด้วย ไม่มี error

**Q: Text.Proper กับเครื่องหมายวรรค (punctuation) จะทำอะไร?**

Text.Proper ถือว่าเครื่องหมายวรรค (comma, period, apostrophe) และช่องว่างเป็นตัวแยกคำ เช่น "it's here" จะกลายเป็น "It'S Here" ลักษณะนี้ต้องระวัง

**Q: culture parameter มีประโยชน์ยังไง?**

culture parameter ใช้สำหรับระบุกฎการแปลงอักษรตามภาษา เช่น "en-US" สำหรับอังกฤษ "th-TH" สำหรับไทย โดยแต่ละภาษามี rule ของตัวเองในการแปลงอักษร

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

- [Microsoft Learn - Text.Proper](https://learn.microsoft.com/en-us/powerquery-m/text-proper) _(official)_
- [PowerQuery.how - Text.Proper](https://powerquery.how/text-proper/) _(article)_

---

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